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

Skip to content

Commit a4fe183

Browse files
musically-utogrisel
authored andcommitted
Increase the max_iter for LabelPropagation. (#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 #5893.
1 parent b03abf1 commit a4fe183

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/semi_supervised/la 816D bel_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