@@ -823,7 +823,7 @@ class NuSVC(BaseSVC):
823
823
SVC. If not given, all classes are supposed to have
824
824
weight one. The "balanced" mode uses the values of y to automatically
825
825
adjust weights inversely proportional to class frequencies as
826
- ``n_samples / (n_classes * np.bincount(y))``
826
+ ``n_samples / (n_classes * np.bincount(y))``.
827
827
828
828
verbose : bool, default=False
829
829
Enable verbose output. Note that this setting takes advantage of a
@@ -927,20 +927,6 @@ class NuSVC(BaseSVC):
927
927
shape_fit_ : tuple of int of shape (n_dimensions_of_X,)
928
928
Array dimensions of training vector ``X``.
929
929
930
- Examples
931
- --------
932
- >>> import numpy as np
933
- >>> X = np.array([[-1, -1], [-2, -1], [1, 1], [2, 1]])
934
- >>> y = np.array([1, 1, 2, 2])
935
- >>> from sklearn.pipeline import make_pipeline
936
- >>> from sklearn.preprocessing import StandardScaler
937
- >>> from sklearn.svm import NuSVC
938
- >>> clf = make_pipeline(StandardScaler(), NuSVC())
939
- >>> clf.fit(X, y)
940
- Pipeline(steps=[('standardscaler', StandardScaler()), ('nusvc', NuSVC())])
941
- >>> print(clf.predict([[-0.8, -1]]))
942
- [1]
943
-
944
930
See Also
945
931
--------
946
932
SVC : Support Vector Machine for classification using libsvm.
@@ -956,6 +942,20 @@ class NuSVC(BaseSVC):
956
942
.. [2] `Platt, John (1999). "Probabilistic outputs for support vector
957
943
machines and comparison to regularizedlikelihood methods."
958
944
<http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.1639>`_
945
+
946
+ Examples
947
+ --------
948
+ >>> import numpy as np
949
+ >>> X = np.array([[-1, -1], [-2, -1], [1, 1], [2, 1]])
950
+ >>> y = np.array([1, 1, 2, 2])
951
+ >>> from sklearn.pipeline import make_pipeline
952
+ >>> from sklearn.preprocessing import StandardScaler
953
+ >>> from sklearn.svm import NuSVC
954
+ >>> clf = make_pipeline(StandardScaler(), NuSVC())
955
+ >>> clf.fit(X, y)
956
+ Pipeline(steps=[('standardscaler', StandardScaler()), ('nusvc', NuSVC())])
957
+ >>> print(clf.predict([[-0.8, -1]]))
958
+ [1]
959
959
"""
960
960
961
961
_impl = "nu_svc"
0 commit comments