-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Increase the max_iter for LabelPropagation. #9441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase the max_iter for LabelPropagation. #9441
Conversation
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.
Does this correspond, approximately, to 30 in LabelSpreading, or is it much more generous? |
Btw, I think we should change this for the 0.19 release, seeing as we're basically overturning |
@musically-ut: If you can briefly illustrate the convergence |
I have tried with the scaled digits dataset with 90% unlabeled data and the RBF kernel and for good cross-validated values of gamma (e.g. gamma between 1 and 20), the effective number of iterations can vary between 2 and 3000 (I had to increase tol to 0.01). So indeed |
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.
Backported to the 0.19.X branch as c51aee8. |
Oh, cool. Thanks @ogrisel! I too was composing a benchmark with the datasets; I noticed that we may have to change the example of digit learning in light of the changed underlying algorithm. |
The digit learning example seems to be fine on the dev branch: |
Yes, the example works with However, is it only me or is the table much harder to read on the |
This is a matplotlib issue, we should use |
@ogrisel I think I prefer backporting just before the release, because otherwise it's hard to keep track of what to backport. |
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.
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.
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.
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.
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.
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.
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.
In practice,
LabelPropagation
converges much slower thanLabelSpreading
. The defaultof
max_iter=30
works well forLabelSpreading
but not forLabelPropagation
. This PR changesmax_iter
forLabelPropagation
to 1000.This was extracted from #5893.