

.. _example_linear_model_plot_sgd_weighted_classes.py:


================================================
SGD: Separating hyperplane with weighted classes
================================================

Fit linear SVMs with and without class weighting.
Allows to handle problems with unbalanced classes.



.. image:: images/plot_sgd_weighted_classes.png
    :align: center

**Python source code:** :download:`plot_sgd_weighted_classes.py <plot_sgd_weighted_classes.py>`

.. literalinclude:: plot_sgd_weighted_classes.py
    :lines: 10-
    