.. _sphx_glr_auto_examples_svm: .. _svm_examples: Support Vector Machines ----------------------- Examples concerning the :mod:`sklearn.svm` module. .. raw:: html <div class="sphx-glr-thumbnails"> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Perform binary classification using non-linear SVC with RBF kernel. The target to predict is a ..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_nonlinear_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_svm_nonlinear.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Non-linear SVM</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="An example using a one-class SVM for novelty detection."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_oneclass_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_oneclass.py` .. raw:: html <div class="sphx-glr-thumbnail-title">One-class SVM with non-linear kernel (RBF)</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="SVCs aim to find a hyperplane that effectively separates the classes in their training data by ..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_kernels_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_svm_kernels.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Plot classification boundaries with different SVM Kernels</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Comparison of different linear SVM classifiers on a 2D projection of the iris dataset. We only ..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_iris_svc_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_iris_svc.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Plot different SVM classifiers in the iris dataset</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Unlike SVC (based on LIBSVM), LinearSVC (based on LIBLINEAR) does not provide the support vecto..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_linearsvc_support_vectors_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_linearsvc_support_vectors.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Plot the support vectors in LinearSVC</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the effect of the parameters gamma and C of the Radial Basis Function ..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_rbf_parameters_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_rbf_parameters.py` .. raw:: html <div class="sphx-glr-thumbnail-title">RBF SVM parameters</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="A small value of C includes more/all the observations, allowing the margins to be calculated us..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_margin_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_svm_margin.py` .. raw:: html <div class="sphx-glr-thumbnail-title">SVM Margins Example</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The two plots differ only in the area in the middle where the classes are tied. If break_ties=F..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_tie_breaking_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_svm_tie_breaking.py` .. raw:: html <div class="sphx-glr-thumbnail-title">SVM Tie Breaking Example</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Simple usage of Support Vector Machines to classify a sample. It will plot the decision surface..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_custom_kernel_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_custom_kernel.py` .. raw:: html <div class="sphx-glr-thumbnail-title">SVM with custom kernel</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to perform univariate feature selection before running a SVC (support ve..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_anova_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_svm_anova.py` .. raw:: html <div class="sphx-glr-thumbnail-title">SVM-Anova: SVM with univariate feature selection</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Plot the maximum margin separating hyperplane within a two-class separable dataset using a Supp..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_separating_hyperplane_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_separating_hyperplane.py` .. raw:: html <div class="sphx-glr-thumbnail-title">SVM: Maximum margin separating hyperplane</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Find the optimal separating hyperplane using an SVC for classes that are unbalanced."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_separating_hyperplane_unbalanced_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_separating_hyperplane_unbalanced.py` .. raw:: html <div class="sphx-glr-thumbnail-title">SVM: Separating hyperplane for unbalanced classes</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Plot decision function of a weighted dataset, where the size of points is proportional to its w..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_weighted_samples_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_weighted_samples.py` .. raw:: html <div class="sphx-glr-thumbnail-title">SVM: Weighted samples</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The following example illustrates the effect of scaling the regularization parameter when using..."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_scale_c_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_svm_scale_c.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Scaling the regularization parameter for SVCs</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Toy example of 1D regression using linear, polynomial and RBF kernels."> .. only:: html .. image:: /auto_examples/svm/images/thumb/sphx_glr_plot_svm_regression_thumb.png :alt: :ref:`sphx_glr_auto_examples_svm_plot_svm_regression.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Support Vector Regression (SVR) using linear and non-linear kernels</div> </div> .. raw:: html </div> .. toctree:: :hidden: /auto_examples/svm/plot_svm_nonlinear /auto_examples/svm/plot_oneclass /auto_examples/svm/plot_svm_kernels /auto_examples/svm/plot_iris_svc /auto_examples/svm/plot_linearsvc_support_vectors /auto_examples/svm/plot_rbf_parameters /auto_examples/svm/plot_svm_margin /auto_examples/svm/plot_svm_tie_breaking /auto_examples/svm/plot_custom_kernel /auto_examples/svm/plot_svm_anova /auto_examples/svm/plot_separating_hyperplane /auto_examples/svm/plot_separating_hyperplane_unbalanced /auto_examples/svm/plot_weighted_samples /auto_examples/svm/plot_svm_scale_c /auto_examples/svm/plot_svm_regression