Skip to content

Commit

Permalink
DOC Ensures that LabelSpreading passes numpydoc validation (#21414)
Browse files Browse the repository at this point in the history
  • Loading branch information
g4brielvs authored and glemaitre committed Oct 25, 2021
1 parent 14fda2f commit d6e24ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

# List of modules ignored when checking for numpydoc validation.
DOCSTRING_IGNORE_LIST = [
"LabelSpreading",
"MultiTaskElasticNetCV",
"SpectralCoclustering",
"SpectralEmbedding",
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

0 comments on commit d6e24ee

Please sign in to comment.