Skip to content

DOC Ensures that LabelSpreading passes numpydoc validation #21414

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
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 @@ -13,7 +13,6 @@

# List of modules ignored when checking for numpydoc validation.
DOCSTRING_IGNORE_LIST = [
"LabelSpreading",
"MultiTaskElasticNetCV",
"OrthogonalMatchingPursuitCV",
"PassiveAggressiveRegressor",
Expand Down
22 changes: 11 additions & 11 deletions sklearn/semi_supervised/_label_propagation.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def fit(self, X, y):


class LabelSpreading(BaseLabelPropagation):
"""LabelSpreading model for semi-supervised learning
"""LabelSpreading model for semi-supervised learning.

This model is similar to the basic Label Propagation algorithm,
but uses affinity matrix based on the normalized graph Laplacian
Expand Down Expand Up @@ -546,6 +546,16 @@ class LabelSpreading(BaseLabelPropagation):
n_iter_ : int
Number of iterations run.

See Also
--------
LabelPropagation : Unregularized graph based semi-supervised learning.

References
----------
Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston,
Bernhard Schoelkopf. Learning with local and global consistency (2004)
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.115.3219

Examples
--------
>>> import numpy as np
Expand All @@ -559,16 +569,6 @@ class LabelSpreading(BaseLabelPropagation):
>>> labels[random_unlabeled_points] = -1
>>> label_prop_model.fit(iris.data, labels)
LabelSpreading(...)

References
----------
Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston,
Bernhard Schoelkopf. Learning with local and global consistency (2004)
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.115.3219

See Also
--------
LabelPropagation : Unregularized graph based semi-supervised learning.
"""

_variant = "spreading"
Expand Down