8000 Increase the max_iter for LabelPropagation. (#9441) · jnothman/scikit-learn@12cd3f7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 12cd3f7

Browse files
musically-utjnothman
authored andcommitted
Increase the max_iter for LabelPropagation. (scikit-learn#9441)
LabelPropagation converges much slower than LabelSpreading. The default of max_iter=30 works well for LabelSpreading but not for LabelPropagation. This was extracted from scikit-learn#5893.
1 parent bacd7a5 commit 12cd3f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/semi_supervised/label_propagation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ class LabelPropagation(BaseLabelPropagation):
380380
_variant = 'propagation'
381381

382382
def __init__(self, kernel='rbf', gamma=20, n_neighbors=7,
383-
alpha=None, max_iter=30, tol=1e-3, n_jobs=1):
383+
alpha=None, max_iter=1000, tol=1e-3, n_jobs=1):
384384
super(LabelPropagation, self).__init__(
385385
kernel=kernel, gamma=gamma, n_neighbors=n_neighbors, alpha=alpha,
386386
max_iter=max_iter, tol=tol, n_jobs=n_jobs)

0 commit comments

Comments
 (0)
0