You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFC deprecate the SAMME.R algorithm in AdaBoostClassifier #26784
While working on the following example (#26486), I found a couple of issues regarding the SAMME.R algorithm, which is the default algorithm in AdaBoostClassifier:
The algorithm was implemented based on the following paper. However, this paper is a preprint. In the final version of the paper, the SAMME.R algorithm is not presented. So we implemented an unpublished algorithm.
So there's an with this deprecation which seems to be a two step deprecation really. One way to do this is:
deprecated "SAMME.R" as an option for algorithm in version x
warning is silenced by setting algorithm="SAMME"
remove "SAMME.R" in version x+2, and deprecated algorithm as an argument
warning is silenced by not passing anything to algorithm
remove algorithm in version x+4
no warnings since we've been telling people to not use algorithm
Another alternative is to deprecate "SAMME.R" and remove algorithm together at version x, but this I'm not sure how to deal with warnings in this case:
we need to warn users that we're removing "SAMME.R", and they need to have a way to silence this warning by setting algorithm to something (None, or "SAMME")
we also need to warn users that algorithm is being removed and that they shouldn't set it.
The above two warnings don't really work together, I'm not sure how to proceed then.
I think we need to go to the first scheme. I don't think we need to hurry by deprecating algorithm right away. We might want to look at the literature regarding the multiclass approach.
I was trying to remove the whole algorithm param at once, so then the user would be shown a warning however their behaviour (not specifying algorithm, since the default would change two versions ahead, or specifying algorithm, because they used a param that's going to deprecated.
Would it work if I'd set algorithm as 'deprecated' as a default in the init() and then redirect it to use samme.r until it's removed in x+2?
I have a forcasting model that used the previous version of AdaBoostClassifier ("SAMME.R") and was very good at predicting. Now with the SAMME algorithm, the predictions are very poor. Can we keep the "SAMME.R" algorithm as an option ?
Hi @BRBroadgate, thanks for reporting, but what you wrote doesn't help deciding on that. You would need to tell us more about your use case and some code example that shows the drop in prediction accuracy.
The reason we deprecated was that SAMME.R was only a pre-print, if I recall correctly, and did not fulfill the criteria to be included in scikit-learn. So your proposal would come down to a feature-request. For this ideally, you would open an issue. Please be aware that #32660 applies for this kind of request and it might take months before someone looks at this issue, if at all. There is not enough time for maintainers to do the careful check that would be required unfortunately.
Activity
adrinjalali commentedon Jul 6, 2023
I'd be +1 for that.
(Also a good issue for @StefanieSenger if we decide to do it)
thomasjpfan commentedon Jul 6, 2023
@glemaitre Did you mean that SAMME.R is not present in the published paper?
glemaitre commentedon Jul 6, 2023
Yes, it is not published. I corrected my sentence.
jpangas commentedon Jul 12, 2023
Is @StefanieSenger working on this already? If not, I would be willing to take it up.:)
StefanieSenger commentedon Jul 12, 2023
Hey @jpangas, I'm working on it already. :)
thomasjpfan commentedon Jul 12, 2023
For the record, I am +1 on deprecating
SAMME.RinAdaBoostClassifer.adrinjalali commentedon Jul 13, 2023
So there's an with this deprecation which seems to be a two step deprecation really. One way to do this is:
"SAMME.R"as an option foralgorithmin versionxalgorithm="SAMME""SAMME.R"in versionx+2, and deprecatedalgorithmas an argumentalgorithmalgorithmin versionx+4algorithmAnother alternative is to deprecate
"SAMME.R"and removealgorithmtogether at versionx, but this I'm not sure how to deal with warnings in this case:"SAMME.R", and they need to have a way to silence this warning by settingalgorithmto something (None, or"SAMME")algorithmis being removed and that they shouldn't set it.The above two warnings don't really work together, I'm not sure how to proceed then.
glemaitre commentedon Jul 13, 2023
I think we need to go to the first scheme. I don't think we need to hurry by deprecating
algorithmright away. We might want to look at the literature regarding the multiclass approach.The first 2 cycles will make use buy time.
StefanieSenger commentedon Jul 13, 2023
I was trying to remove the whole
algorithmparam at once, so then the user would be shown a warning however their behaviour (not specifying algorithm, since the default would change two versions ahead, or specifying algorithm, because they used a param that's going to deprecated.Would it work if I'd set algorithm as 'deprecated' as a default in the init() and then redirect it to use samme.r until it's removed in x+2?
StefanieSenger commentedon Jul 13, 2023
Or, I can also implement the first version (only deprecating
SAMME.R).glemaitre commentedon Jul 13, 2023
The first version will make it easier.
BRBroadgate commentedon Nov 21, 2025
I have a forcasting model that used the previous version of AdaBoostClassifier ("SAMME.R") and was very good at predicting. Now with the SAMME algorithm, the predictions are very poor. Can we keep the "SAMME.R" algorithm as an option ?
StefanieSenger commentedon Nov 21, 2025
Hi @BRBroadgate, thanks for reporting, but what you wrote doesn't help deciding on that. You would need to tell us more about your use case and some code example that shows the drop in prediction accuracy.
The reason we deprecated was that SAMME.R was only a pre-print, if I recall correctly, and did not fulfill the criteria to be included in scikit-learn. So your proposal would come down to a feature-request. For this ideally, you would open an issue. Please be aware that #32660 applies for this kind of request and it might take months before someone looks at this issue, if at all. There is not enough time for maintainers to do the careful check that would be required unfortunately.