8000 [MRG+1] docs(MLPClassifier): add multi-label support in fit docstring by alexandercbooth · Pull Request #7974 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

[MRG+1] docs(MLPClassifier): add multi-label support in fit docstring #7974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading 8000
Diff view
Diff view
31 changes: 16 additions & 15 deletions sklearn/neural_network/multilayer_perceptron.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,15 +601,16 @@ def _update_no_improvement_count(self, early_stopping, X_val, y_val):
self.best_loss_ = self.loss_curve_[-1]

def fit(self, X, y):
"""Fit the model to data matrix X and target y.
"""Fit the model to data matrix X and target(s) y.

Parameters
----------
X : {array-like, sparse matrix}, shape (n_samples, n_features)
X : array-like or sparse matrix, shape (n_samples, n_features)
The input data.

y : array-like, shape (n_samples,)
The target values.
y : array-like, shape (n_samples,) or (n_samples, n_outputs)
The target values (class labels in classification, real numbers in
regression).

Returns
-------
Expand Down Expand Up @@ -818,17 +819,17 @@ class MLPClassifier(BaseMultilayerPerceptron, ClassifierMixin):

Attributes
----------
`classes_` : array or list of array of shape (n_classes,)
classes_ : array or list of array of shape (n_classes,)
Class labels for each output.

`loss_` : float
loss_ : float
The current loss computed with the loss function.

`coefs_` : list, length n_layers - 1
coefs_ : list, length n_layers - 1
The ith element in the list represents the weight matrix corresponding
to layer i.

`intercepts_` : list, length n_layers - 1
intercepts_ : list, length n_layers - 1
The ith element in the list represents the bias vector corresponding to
layer i + 1.

Expand All @@ -838,10 +839,10 @@ class MLPClassifier(BaseMultilayerPerceptron, ClassifierMixin):
n_layers_ : int
Number of layers.

`n_outputs_` : int
n_outputs_ : int
Number of outputs.

`out_activation_` : string
out_activation_ : string
Name of the output activation function.

Notes
Expand Down Expand Up @@ -1163,14 +1164,14 @@ class MLPRegressor(BaseMultilayerPerceptron, RegressorMixin):

Attributes
----------
`loss_` : float
loss_ : float
The current loss computed with the loss function.

`coefs_` : list, length n_layers - 1
coefs_ : list, length n_layers - 1
The ith element in the list represents the weight matrix corresponding
to layer i.

`intercepts_` : list, length n_layers - 1
intercepts_ : list, length n_layers - 1
The ith element in the list represents the bias vector corresponding to
layer i + 1.

Expand All @@ -1180,10 +1181,10 @@ class MLPRegressor(BaseMultilayerPerceptron, RegressorMixin):
n_layers_ : int
Number of layers.

`n_outputs_` : int
n_outputs_ : int
Number of outputs.

`out_activation_` : string
out_activation_ : string
Name of the output activation function.

Notes
Expand Down
0