

.. _sphx_glr_auto_examples_semi_supervised:

.. _semi_supervised_examples:

Semi Supervised Classification
------------------------------

Examples concerning the :mod:`sklearn.semi_supervised` module.



.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example compares decision boundaries learned by two semi-supervised methods, namely LabelSpreading and SelfTrainingClassifier, while varying the proportion of labeled training data from small fractions up to the full dataset.">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_semi_supervised_versus_svm_iris_thumb.png
    :alt:

  :doc:`/auto_examples/semi_supervised/plot_semi_supervised_versus_svm_iris`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Decision boundary of semi-supervised classifiers versus SVM on the Iris dataset</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of a varying threshold on self-training. The breast_cancer dataset is loaded, and labels are deleted such that only 50 out of 569 samples have labels. A SelfTrainingClassifier is fitted on this dataset, with varying thresholds.">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_self_training_varying_threshold_thumb.png
    :alt:

  :doc:`/auto_examples/semi_supervised/plot_self_training_varying_threshold`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Effect of varying threshold for self-training</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Example of LabelPropagation learning a complex internal structure to demonstrate &quot;manifold learning&quot;. The outer circle should be labeled &quot;red&quot; and the inner circle &quot;blue&quot;. Because both label groups lie inside their own distinct shape, we can see that the labels propagate correctly around the circle.">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_label_propagation_structure_thumb.png
    :alt:

  :doc:`/auto_examples/semi_supervised/plot_label_propagation_structure`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Label Propagation circles: Learning a complex structure</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Demonstrates an active learning technique to learn handwritten digits using label propagation.">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_label_propagation_digits_active_learning_thumb.png
    :alt:

  :doc:`/auto_examples/semi_supervised/plot_label_propagation_digits_active_learning`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Label Propagation digits: Active learning</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the power of semisupervised learning by training a Label Spreading model to classify handwritten digits with sets of very few labels.">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_label_propagation_digits_thumb.png
    :alt:

  :doc:`/auto_examples/semi_supervised/plot_label_propagation_digits`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Label Propagation digits: Demonstrating performance</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the effectiveness of semi-supervised learning for text classification on sklearn.feature_extraction.text.TfidfTransformer features when labeled data is scarce. For such purpose we compare four different approaches:">

.. only:: html

  .. image:: /auto_examples/semi_supervised/images/thumb/sphx_glr_plot_semi_supervised_newsgroups_thumb.png
    :alt:

  :doc:`/auto_examples/semi_supervised/plot_semi_supervised_newsgroups`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Semi-supervised Classification on a Text Dataset</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/semi_supervised/plot_semi_supervised_versus_svm_iris
   /auto_examples/semi_supervised/plot_self_training_varying_threshold
   /auto_examples/semi_supervised/plot_label_propagation_structure
   /auto_examples/semi_supervised/plot_label_propagation_digits_active_learning
   /auto_examples/semi_supervised/plot_label_propagation_digits
   /auto_examples/semi_supervised/plot_semi_supervised_newsgroups

