8000 docs(MLPClassifier): add multi-label support in fit docstring and rem… · scikit-learn/scikit-learn@f9c6344 · GitHub
[go: up one dir, main page]

Skip to content

Commit f9c6344

Browse files
alexandercboothamueller
authored andcommitted
docs(MLPClassifier): add multi-label support in fit docstring and remove unnecessary backticks in attributes (#7974)
1 parent d39c273 commit f9c6344

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

sklearn/neural_network/multilayer_perceptron.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -601,15 +601,16 @@ def _update_no_improvement_count(self, early_stopping, X_val, y_val):
601601
self.best_loss_ = self.loss_curve_[-1]
602602

603603
def fit(self, X, y):
604-
"""Fit the model to data matrix X and target y.
604+
"""Fit the model to data matrix X and target(s) y.
605605
606606
Parameters
607607
----------
608-
X : {array-like, sparse matrix}, shape (n_samples, n_feature 8000 s)
608+
X : array-like or sparse matrix, shape (n_samples, n_features)
609609
The input data.
610610
611-
y : array-like, shape (n_samples,)
612-
The target values.
611+
y : array-like, shape (n_samples,) or (n_samples, n_outputs)
612+
The target values (class labels in classification, real numbers in
613+
regression).
613614
614615
Returns
615616
-------
@@ -818,17 +819,17 @@ class MLPClassifier(BaseMultilayerPerceptron, ClassifierMixin):
818819
819820
Attributes
820821
----------
821-
`classes_` : array or list of array of shape (n_classes,)
822+
classes_ : array or list of array of shape (n_classes,)
822823
Class labels for each output.
823824
824-
`loss_` : float
825+
loss_ : float
825826
The current loss computed with the loss function.
826827
827-
`coefs_` : list, length n_layers - 1
828+
coefs_ : list, length n_layers - 1
828829
The ith element in the list represents the weight matrix corresponding
829830
to layer i.
830831
831-
`intercepts_` : list, length n_layers - 1
832+
intercepts_ : list, length n_layers - 1
832833
The ith element in the list represents the bias vector corresponding to
833834
layer i + 1.
834835
@@ -838,10 +839,10 @@ class MLPClassifier(BaseMultilayerPerceptron, ClassifierMixin):
838839
n_layers_ : int
839840
Number of layers.
840841
841-
`n_outputs_` : int
842+
n_outputs_ : int
842843
Number of outputs.
843844
844-
`out_activation_` : string
845+
out_activation_ : string
845846
Name of the output activation function.
846847
847848
Notes
@@ -1163,14 +1164,14 @@ class MLPRegressor(BaseMultilayerPerceptron, RegressorMixin):
11631164
11641165
Attributes
11651166
----------
1166-
`loss_` : float
1167+
loss_ : float
11671168
The current loss computed with the loss function.
11681169
1169-
`coefs_` : list, length n_layers - 1
1170+
coefs_ : list, length n_layers - 1
11701171
The ith element in the list represents the weight matrix corresponding
11711172
to layer i.
11721173
1173-
`intercepts_` : list, length n_layers - 1
1174+
intercepts_ : list, length n_layers - 1
11741175
The ith element in the list represents the bias vector corresponding to
11751176
layer i + 1.
11761177
@@ -1180,10 +1181,10 @@ class MLPRegressor(BaseMultilayerPerceptron, RegressorMixin):
11801181
n_layers_ : int
11811182
Number of layers.
11821183
1183-
`n_outputs_` : int
1184+
n_outputs_ : int
11841185
Number of outputs.
11851186
1186-
`out_activation_` : string
1187+
out_activation_ : string
11871188
Name of the output activation function.
11881189
11891190
Notes

0 commit comments

Comments
 (0)
0