-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Closed
Labels
Documentationgood first issueEasy with clear instructions to resolveEasy with clear instructions to resolvehelp wanted
Description
Description
The clumping factor, alpha, of Label Spreading semi-supervised algorithm must be in the open interval (0,1), otherwise an error is thrown, see lines 244-247 in the label_propagation.py file (version of sklearn 0.20.1). According to documentation the clumping factor takes values in the closed interval [0, 1].
Steps/Code to Reproduce
Example:
import numpy as np
import sklearn
from sklearn.semi_supervised import LabelSpreading
print(sklearn.__version__)
X = np.random.rand(100, 5)
y = - np.ones(100)
y[0] = 0
y[1] = 1
model = LabelSpreading(kernel='rbf', gamma=1, alpha=0)
model.fit(X, y)
Actual Results
ValueError: alpha=0 is invalid: it must be inside the open interval (0, 1)
Versions
For scikit-learn >= 0.20:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Documentationgood first issueEasy with clear instructions to resolveEasy with clear instructions to resolvehelp wanted