@@ -494,18 +494,18 @@ def partial_fit(self, X, y, classes=None, sample_weight=None):
494
494
X : {array-like, sparse matrix}, shape (n_samples, n_features)
495
495
Subset of the training data
496
496
497
- y : numpy array, shape (n_samples,)
497
+ y : numpy array, shape (n_samples, )
498
498
Subset of the target values
499
499
500
- classes : array, shape (n_classes,)
500
+ classes : array, shape (n_classes, )
501
501
Classes across all calls to partial_fit.
502
502
Can be obtained by via `np.unique(y_all)`, where y_all is the
503
503
target vector of the entire dataset.
504
504
This argument is required for the first call to partial_fit
505
505
and can be omitted in the subsequent calls.
506
506
Note that y doesn't need to contain all labels in `classes`.
507
507
508
- sample_weight : array-like, shape (n_samples,), optional
508
+ sample_weight : array-like, shape (n_samples, ), optional
509
509
Weights applied to individual samples.
510
510
If not provided, uniform weights are assumed.
511
511
@@ -527,16 +527,16 @@ def fit(self, X, y, coef_init=None, intercept_init=None,
527
527
X : {array-like, sparse matrix}, shape (n_samples, n_features)
528
528
Training data
529
529
530
- y : numpy array, shape (n_samples,)
530
+ y : numpy array, shape (n_samples, )
531
531
Target values
532
532
533
533
coef_init : array, shape (n_classes,n_features)
534
534
The initial coefficients to warm-start the optimization.
535
535
536
- intercept_init : array, shape (n_classes,)
536
+ intercept_init : array, shape (n_classes, )
537
537
The initial intercept to warm-start the optimization.
538
538
539
- sample_weight : array-like, shape (n_samples,), optional
539
+ sample_weight : array-like, shape (n_samples, ), optional
540
540
Weights applied to individual samples.
541
541
If not provided, uniform weights are assumed.
542
542
@@ -672,7 +672,7 @@ class SGDClassifier(BaseSGDClassifier, _LearntSelectorMixin):
672
672
n_features)
673
673
Weights assigned to the features.
674
674
675
- intercept_ : array, shape (1,) if n_classes == 2 else (n_classes,)
675
+ intercept_ : array, shape (1, ) if n_classes == 2 else (n_classes, )
676
676
Constants in decision function.
677
677
678
678
Examples
@@ -888,10 +888,10 @@ def partial_fit(self, X, y, sample_weight=None):
888
888
X : {array-like, sparse matrix}, shape (n_samples, n_features)
889
889
Subset of training data
890
890
891
- y : numpy array of shape (n_samples,)
891
+ y : numpy array of shape (n_samples, )
892
892
Subset of target values
893
893
894
- sample_weight : array-like, shape (n_samples,), optional
894
+ sample_weight : array-like, shape (n_samples, ), optional
895
895
Weights applied to individual samples.
896
896
If not provided, uniform weights are assumed.
897
897
@@ -938,16 +938,16 @@ def fit(self, X, y, coef_init=None, intercept_init=None,
938
938
X : {array-like, sparse matrix}, shape (n_samples, n_features)
939
939
Training data
940
940
941
- y : numpy array, shape (n_samples,)
941
+ y : numpy array, shape (n_samples, )
942
942
Target values
943
943
944
- coef_init : array, shape (n_features,)
944
+ coef_init : array, shape (n_features, )
945
945
The initial coefficients to warm-start the optimization.
946
946
947
- intercept_init : array, shape (1,)
947
+ intercept_init : array, shape (1, )
948
948
The initial intercept to warm-start the optimization.
949
949
950
- sample_weight : array-like, shape (n_samples,), optional
950
+ sample_weight : array-like, shape (n_samples, ), optional
951
951
Weights applied to individual samples (1. for unweighted).
952
952
953
953
Returns
@@ -969,7 +969,7 @@ def decision_function(self, X):
969
969
970
970
Returns
971
971
-------
972
- array, shape (n_samples,)
972
+ array, shape (n_samples, )
973
973
Predicted target values per element in X.
974
974
"""
975
975
X = check_array (X , accept_sparse = 'csr' )
@@ -987,7 +987,7 @@ def predict(self, X):
987
987
988
988
Returns
989
989
-------
990
- array, shape (n_samples,)
990
+ array, shape (n_samples, )
991
991
Predicted target values per element in X.
992
992
"""
993
993
return self .decision_function (X )
@@ -1159,16 +1159,16 @@ class SGDRegressor(BaseSGDRegressor, _LearntSelectorMixin):
1159
1159
1160
1160
Attributes
1161
1161
----------
1162
- coef_ : array, shape (n_features,)
1162
+ coef_ : array, shape (n_features, )
1163
1163
Weights asigned to the features.
1164
1164
1165
- intercept_ : array, shape (1,)
1165
+ intercept_ : array, shape (1, )
1166
1166
The intercept term.
1167
1167
1168
- `average_coef_` : array, shape (n_features,)
1168
+ `average_coef_` : array, shape (n_features, )
1169
1169
Averaged weights assigned to the features.
1170
1170
1171
- `average_intercept_` : array, shape (1)
1171
+ `average_intercept_` : array, shape (1, )
1172
1172
The averaged intercept term.
1173
1173
1174
1174
Examples
0 commit comments