-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
MNT Deprecate SAMME.R algorithm from AdaBoostClassifier #26830
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @glemaitre
Could you also make sure this parameter is set in all examples correctly so that examples and our documentation won't raise a warning? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good. We need to make the changes suggested by @adrinjalali.
I think that we should remove the following example: https://scikit-learn.org/dev/auto_examples/ensemble/plot_adaboost_hastie_10_2.html#sphx-glr-auto-examples-ensemble-plot-adaboost-hastie-10-2-py. We need to change the user guide figure and probably redirect this example to the one that you edited earlier.
The redirection is done in the doc/conf.py
file:
Lines 283 to 302 in 75f3e47
# redirects dictionary maps from old links to new links | |
redirects = { | |
"documentation": "index", | |
"auto_examples/feature_selection/plot_permutation_test_for_classification": ( | |
"auto_examples/model_selection/plot_permutation_tests_for_classification" | |
), | |
"modules/model_persistence": "model_persistence", | |
"auto_examples/linear_model/plot_bayesian_ridge": ( | |
"auto_examples/linear_model/plot_ard" | |
), | |
"auto_examples/model_selection/grid_search_text_feature_extraction.py": ( | |
"auto_examples/model_selection/plot_grid_search_text_feature_extraction.py" | |
), | |
"auto_examples/miscellaneous/plot_changed_only_pprint_parameter": ( | |
"auto_examples/miscellaneous/plot_estimator_representation" | |
), | |
"auto_examples/decomposition/plot_beta_divergence": ( | |
"auto_examples/applications/plot_topics_extraction_with_nmf_lda" | |
), | |
} |
we need to map the previous example name to the new one.
Thank you, @glemaitre and @adrinjalali, for the review and the directions. I have tried to implement this; lets hope most of it correctly. Some comments about some things I was unsure about: I deleted the whole example plot-adaboost-hastie-10-2-py. Is that correct? I changed where AdaBoostClassifier was instantiated with the default algorithms to now use “SAMME”, but was not sure about I modified the expected output lines of the example in the docstring of AdaBoostClassifier by hand so that it passes the doctest. Is this the correct way of dealing with this? I investigating how to run this automatic, but I didn’t manage to find out. In the user guide (doc/modules/ensemble.rst), li. 1580-1581 needs to be changed in version 1.6. How would we document this, so it’s not forgotten (since .. /n TODO(1.6) will again show up on IDEs?)? Those two lines I mean:
Looking forward to your further reviews! |
Sounds good.
I think we should fix the benchmark as well.
We basically copy the code to a python REPL (not ipython),
We can already remove SAMME.R from the docs, our user guides shouldn't mention something which is already deprecated. |
I believe the tests will only be changed, once |
Some of the failures are still legitimate. You can reproduce the error locally by running pytest -vsl sklearn -Werror::FutureWarning Regarding the fixes:
For the docstring test, we will need to modify the instantiation of |
@StefanieSenger would you mind resolving the conflicts? I can make a final review after. |
Sure, @glemaitre, I have just resolved the conflicts. :) I hadn't noticed them before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I merge main
in this branch. Let see if the CI will pass.
Thanks, @glemaitre. The CI failure is not related, I believe? |
Nop something link to GBDT and the new loss. We are tracking there: #27312 |
Merging then. |
Thanks @StefanieSenger |
…#26830) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Reference Issues/PRs
Fixes #26784
What does this implement/fix? Explain your changes.
This PR deprecates the
SAMME.R
algorithm as an algorithm in the AdaBoostClassifier as discussed in issue #26784.