Skip to content

DOC Ensures that PassiveAggressiveRegressor passes numpydoc validation #21413

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 2 commits into from
Oct 23, 2021
Merged
Show file tree
Hide file tree
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
Diff view
Diff view
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
DOCSTRING_IGNORE_LIST = [
"LabelSpreading",
"MultiTaskElasticNetCV",
"PassiveAggressiveRegressor",
"SpectralCoclustering",
"SpectralEmbedding",
"StackingRegressor",
Expand Down
27 changes: 13 additions & 14 deletions sklearn/linear_model/_passive_aggressive.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def fit(self, X, y, coef_init=None, intercept_init=None):


class PassiveAggressiveRegressor(BaseSGDRegressor):
"""Passive Aggressive Regressor
"""Passive Aggressive Regressor.

Read more in the :ref:`User Guide <passive_aggressive>`.

Expand Down Expand Up @@ -352,7 +352,7 @@ class PassiveAggressiveRegressor(BaseSGDRegressor):
shuffle : bool, default=True
Whether or not the training data should be shuffled after each epoch.

verbose : integer, default=0
verbose : int, default=0
The verbosity level.

loss : str, default="epsilon_insensitive"
Expand Down Expand Up @@ -416,6 +416,17 @@ class PassiveAggressiveRegressor(BaseSGDRegressor):
Number of weight updates performed during training.
Same as ``(n_iter_ * n_samples)``.

See Also
--------
SGDRegressor : Linear model fitted by minimizing a regularized
empirical loss with SGD.

References
----------
Online Passive-Aggressive Algorithms
<http://jmlr.csail.mit.edu/papers/volume7/crammer06a/crammer06a.pdf>
K. Crammer, O. Dekel, J. Keshat, S. Shalev-Shwartz, Y. Singer - JMLR (2006).

Examples
--------
>>> from sklearn.linear_model import PassiveAggressiveRegressor
Expand All @@ -432,18 +443,6 @@ class PassiveAggressiveRegressor(BaseSGDRegressor):
[-0.02306214]
>>> print(regr.predict([[0, 0, 0, 0]]))
[-0.02306214]

See Also
--------
SGDRegressor : Linear model fitted by minimizing a regularized
empirical loss with SGD.

References
----------
Online Passive-Aggressive Algorithms
<http://jmlr.csail.mit.edu/papers/volume7/crammer06a/crammer06a.pdf>
K. Crammer, O. Dekel, J. Keshat, S. Shalev-Shwartz, Y. Singer - JMLR (2006).

"""

def __init__(
Expand Down