Skip to content

Commit 20b188c

Browse files
committed
Minor docstring fixes to svm/classes.py
1 parent 6c5caa3 commit 20b188c

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

sklearn/svm/classes.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class LinearSVC(BaseEstimator, LinearClassifierMixin,
1515
1616
Similar to SVC with parameter kernel='linear', but implemented in terms of
1717
liblinear rather than libsvm, so it has more flexibility in the choice of
18-
penalties and loss functions and should scale better (to large numbers of
19-
samples).
18+
penalties and loss functions and should scale better to large numbers of
19+
samples.
2020
2121
This class supports both dense and sparse input and the multiclass support
2222
is handled according to a one-vs-the-rest scheme.
@@ -48,16 +48,16 @@ class LinearSVC(BaseEstimator, LinearClassifierMixin,
4848
two classes.
4949
`ovr` trains n_classes one-vs-rest classifiers, while `crammer_singer`
5050
optimizes a joint objective over all classes.
51-
While `crammer_singer` is interesting from an theoretical perspective
52-
as it is consistent it is seldom used in practice and rarely leads to
53-
better accuracy and is more expensive to compute.
51+
While `crammer_singer` is as interesting from an theoretical perspective
52+
as it is consistent, it is seldom used in practice and rarely leads to
53+
better accuracy. It is also more expensive to compute.
5454
If `crammer_singer` is chosen, the options loss, penalty and dual will
5555
be ignored.
5656
5757
fit_intercept : boolean, optional (default=True)
5858
Whether to calculate the intercept for this model. If set
5959
to false, no intercept will be used in calculations
60-
(e.g. data is expected to be already centered).
60+
(i.e. data is expected to be already centered).
6161
6262
intercept_scaling : float, optional (default=1)
6363
When self.fit_intercept is True, instance vector x becomes
@@ -68,7 +68,7 @@ class LinearSVC(BaseEstimator, LinearClassifierMixin,
6868
Note! the synthetic feature weight is subject to l1/l2 regularization
6969
as all other features.
7070
To lessen the effect of regularization on synthetic feature weight
71-
(and therefore on the intercept) intercept_scaling has to be increased
71+
(and therefore on the intercept) intercept_scaling has to be increased.
7272
7373
class_weight : {dict, 'auto'}, optional
7474
Set the parameter C of class i to class_weight[i]*C for
@@ -94,7 +94,7 @@ class frequencies.
9494
coef_ : array, shape = [n_features] if n_classes == 2 \
9595
else [n_classes, n_features]
9696
Weights assigned to the features (coefficients in the primal
97-
problem). This is only available in the case of linear kernel.
97+
problem). This is only available in the case of a linear kernel.
9898
9999
`coef_` is a readonly property derived from `raw_coef_` that \
100100
follows the internal memory layout of liblinear.
@@ -105,9 +105,9 @@ class frequencies.
105105
Notes
106106
-----
107107
The underlying C implementation uses a random number generator to
108-
select features when fitting the model. It is thus not uncommon,
108+
select features when fitting the model. It is thus not uncommon
109109
to have slightly different results for the same input data. If
110-
that happens, try with a smaller tol parameter.
110+
that happens, try with a smaller `tol` parameter.
111111
112112
The underlying implementation (liblinear) uses a sparse internal
113113
representation for the data that will incur a memory copy.
@@ -220,8 +220,8 @@ class LinearSVR(LinearModel, RegressorMixin):
220220
221221
Similar to SVR with parameter kernel='linear', but implemented in terms of
222222
liblinear rather than libsvm, so it has more flexibility in the choice of
223-
penalties and loss functions and should scale better (to large numbers of
224-
samples).
223+
penalties and loss functions and should scale better to large numbers of
224+
samples.
225225
226226
This class supports both dense and sparse input.
227227
@@ -251,7 +251,7 @@ class LinearSVR(LinearModel, RegressorMixin):
251251
fit_intercept : boolean, optional (default=True)
252252
Whether to calculate the intercept for this model. If set
253253
to false, no intercept will be used in calculations
254-
(e.g. data is expected to be already centered).
254+
(i.e. data is expected to be already centered).
255255
256256
intercept_scaling : float, optional (default=1)
257257
When self.fit_intercept is True, instance vector x becomes
@@ -281,7 +281,7 @@ class LinearSVR(LinearModel, RegressorMixin):
281281
coef_ : array, shape = [n_features] if n_classes == 2 \
282282
else [n_classes, n_features]
283283
Weights assigned to the features (coefficients in the primal
284-
problem). This is only available in the case of linear kernel.
284+
problem). This is only available in the case of a linear kernel.
285285
286286
`coef_` is a readonly property derived from `raw_coef_` that \
287287
follows the internal memory layout of liblinear.
@@ -466,7 +466,7 @@ class frequencies.
466466
467467
coef_ : array, shape = [n_class-1, n_features]
468468
Weights assigned to the features (coefficients in the primal
469-
problem). This is only available in the case of linear kernel.
469+
problem). This is only available in the case of a linear kernel.
470470
471471
`coef_` is a readonly property derived from `dual_coef_` and
472472
`support_vectors_`.
@@ -590,7 +590,7 @@ class NuSVC(BaseSVC):
590590
591591
coef_ : array, shape = [n_class-1, n_features]
592592
Weights assigned to the features (coefficients in the primal
593-
problem). This is only available in the case of linear kernel.
593+
problem). This is only available in the case of a linear kernel.
594594
595595
`coef_` is readonly property derived from `dual_coef_` and
596596
`support_vectors_`.
@@ -699,7 +699,7 @@ class SVR(BaseLibSVM, RegressorMixin):
699699
700700
coef_ : array, shape = [1, n_features]
701701
Weights assigned to the features (coefficients in the primal
702-
problem). This is only available in the case of linear kernel.
702+
problem). This is only available in the case of a linear kernel.
703703
704704
`coef_` is readonly property derived from `dual_coef_` and
705705
`support_vectors_`.
@@ -809,7 +809,7 @@ class NuSVR(BaseLibSVM, RegressorMixin):
809809
810810
coef_ : array, shape = [1, n_features]
811811
Weights assigned to the features (coefficients in the primal
812-
problem). This is only available in the case of linear kernel.
812+
problem). This is only available in the case of a linear kernel.
813813
814814
`coef_` is readonly property derived from `dual_coef_` and
815815
`support_vectors_`.
@@ -919,7 +919,7 @@ class OneClassSVM(BaseLibSVM):
919919
920920
coef_ : array, shape = [n_classes-1, n_features]
921921
Weights assigned to the features (coefficients in the primal
922-
problem). This is only available in the case of linear kernel.
922+
problem). This is only available in the case of a linear kernel.
923923
924924
`coef_` is readonly property derived from `dual_coef_` and
925925
`support_vectors_`

0 commit comments

Comments
 (0)