Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 320e392

Browse filesBrowse files
authored
DOC Update MLPRegressor docs (scikit-learn#25556)
Co-authored-by: Ian Thompson <ian.thompson@hrblock.com>
1 parent 7671e54 commit 320e392
Copy full SHA for 320e392

File tree

1 file changed

+12
-8
lines changed
Filter options

1 file changed

+12
-8
lines changed

‎sklearn/neural_network/_multilayer_perceptron.py

Copy file name to clipboardExpand all lines: sklearn/neural_network/_multilayer_perceptron.py
+12-8Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ class MLPRegressor(RegressorMixin, BaseMultilayerPerceptron):
13021302
13031303
batch_size : int, default='auto'
13041304
Size of minibatches for stochastic optimizers.
1305-
If the solver is 'lbfgs', the classifier will not use minibatch.
1305+
If the solver is 'lbfgs', the regressor will not use minibatch.
13061306
When set to "auto", `batch_size=min(200, n_samples)`.
13071307
13081308
learning_rate : {'constant', 'invscaling', 'adaptive'}, default='constant'
@@ -1365,7 +1365,7 @@ class MLPRegressor(RegressorMixin, BaseMultilayerPerceptron):
13651365
previous solution. See :term:`the Glossary <warm_start>`.
13661366
13671367
momentum : float, default=0.9
1368-
Momentum for gradient descent update. Should be between 0 and 1. Only
1368+
Momentum for gradient descent update. Should be between 0 and 1. Only
13691369
used when solver='sgd'.
13701370
13711371
nesterovs_momentum : bool, default=True
@@ -1374,10 +1374,10 @@ class MLPRegressor(RegressorMixin, BaseMultilayerPerceptron):
13741374
13751375
early_stopping : bool, default=False
13761376
Whether to use early stopping to terminate training when validation
1377-
score is not improving. If set to true, it will automatically set
1378-
aside 10% of training data as validation and terminate training when
1379-
validation score is not improving by at least ``tol`` for
1380-
``n_iter_no_change`` consecutive epochs.
1377+
score is not improving. If set to True, it will automatically set
1378+
aside ``validation_fraction`` of training data as validation and
1379+
terminate training when validation score is not improving by at
1380+
least ``tol`` for ``n_iter_no_change`` consecutive epochs.
13811381
Only effective when solver='sgd' or 'adam'.
13821382
13831383
validation_fraction : float, default=0.1
@@ -1404,7 +1404,7 @@ class MLPRegressor(RegressorMixin, BaseMultilayerPerceptron):
14041404
14051405
max_fun : int, default=15000
14061406
Only used when solver='lbfgs'. Maximum number of function calls.
1407-
The solver iterates until convergence (determined by 'tol'), number
1407+
The solver iterates until convergence (determined by ``tol``), number
14081408
of iterations reaches max_iter, or this number of function calls.
14091409
Note that number of function calls will be greater than or equal to
14101410
the number of iterations for the MLPRegressor.
@@ -1418,22 +1418,26 @@ class MLPRegressor(RegressorMixin, BaseMultilayerPerceptron):
14181418
14191419
best_loss_ : float
14201420
The minimum loss reached by the solver throughout fitting.
1421-
If `early_stopping=True`, this attribute is set ot `None`. Refer to
1421+
If `early_stopping=True`, this attribute is set to `None`. Refer to
14221422
the `best_validation_score_` fitted attribute instead.
1423+
Only accessible when solver='sgd' or 'adam'.
14231424
14241425
loss_curve_ : list of shape (`n_iter_`,)
14251426
Loss value evaluated at the end of each training step.
14261427
The ith element in the list represents the loss at the ith iteration.
1428+
Only accessible when solver='sgd' or 'adam'.
14271429
14281430
validation_scores_ : list of shape (`n_iter_`,) or None
14291431
The score at each iteration on a held-out validation set. The score
14301432
reported is the R2 score. Only available if `early_stopping=True`,
14311433
otherwise the attribute is set to `None`.
1434+
Only accessible when solver='sgd' or 'adam'.
14321435
14331436
best_validation_score_ : float or None
14341437
The best validation score (i.e. R2 score) that triggered the
14351438
early stopping. Only available if `early_stopping=True`, otherwise the
14361439
attribute is set to `None`.
1440+
Only accessible when solver='sgd' or 'adam'.
14371441
14381442
t_ : int
14391443
The number of training samples seen by the solver during fitting.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.