Skip to content

Commit 8570a69

Browse files
authored
DOC Ensures that LabelSpreading passes numpydoc validation (#21414)
1 parent 7288aee commit 8570a69

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

maint_tools/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
# List of modules ignored when checking for numpydoc validation.
1515
DOCSTRING_IGNORE_LIST = [
16-
"LabelSpreading",
1716
"MultiTaskElasticNetCV",
1817
"SpectralCoclustering",
1918
"SpectralEmbedding",

sklearn/semi_supervised/_label_propagation.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def fit(self, X, y):
476476

477477

478478
class LabelSpreading(BaseLabelPropagation):
479-
"""LabelSpreading model for semi-supervised learning
479+
"""LabelSpreading model for semi-supervised learning.
480480
481481
This model is similar to the basic Label Propagation algorithm,
482482
but uses affinity matrix based on the normalized graph Laplacian
@@ -546,6 +546,16 @@ class LabelSpreading(BaseLabelPropagation):
546546
n_iter_ : int
547547
Number of iterations run.
548548
549+
See Also
550+
--------
551+
LabelPropagation : Unregularized graph based semi-supervised learning.
552+
553+
References
554+
----------
555+
Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston,
556+
Bernhard Schoelkopf. Learning with local and global consistency (2004)
557+
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.115.3219
558+
549559
Examples
550560
--------
551561
>>> import numpy as np
@@ -559,16 +569,6 @@ class LabelSpreading(BaseLabelPropagation):
559569
>>> labels[random_unlabeled_points] = -1
560570
>>> label_prop_model.fit(iris.data, labels)
561571
LabelSpreading(...)
562-
563-
References
564-
----------
565-
Dengyong Zhou, Olivier Bousquet, Thomas Navin Lal, Jason Weston,
566-
Bernhard Schoelkopf. Learning with local and global consistency (2004)
567-
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.115.3219
568-
569-
See Also
570-
--------
571-
LabelPropagation : Unregularized graph based semi-supervised learning.
572572
"""
573573

574574
_variant = "spreading"

0 commit comments

Comments
 (0)