Repository navigation
DOC use notebook style in AdaBoostClassifier example - #26486
Conversation
|
Ups, I posted my review to early. This is only a partial review. Let me finish it :) |
glemaitre
left a comment
There was a problem hiding this comment.
Here is another partial review. I will look at the comparison in few hours.
|
@glemaitre Thank you for your suggestions. I've implemented all of them and also worked on the text regarding the performance comparison. Let me know what you think, especially on the descriptions of the plots. |
|
OK, I finish the round of review at least for the first pass. I am almost sure that we have an issue with the SAMME.R algorithm. I don't know if this is because of the code or if this is only the theory that does not work. I will try to investigate a bit more. I think that we can go around this problem in this example by discussing only the weak learner errors and weights of the SAMME algorithm since they are also the ones depicted in the paper. We should only be careful to have truthful statements until we find the reason that the SAMME.R can start to diverge. I will make a minimal reproducer and add it in #20443. |
|
@glemaitre Just saw your other comments from the last hour. I will go through them and reply later today. |
|
I‘ve implemented basically as you suggested. Thanks for your thorough review. Please have a look at my descriptions of the plots. The main differences to what you suggested are:
Note: the reference section doesn‘t work for me, need to find out how to repair the on another day. PS: Re-reading my own message I want to add, that those things I kept unchanged for the moment are of cause up to discussion. When I summed them up I was looking for a way to structure the discussion. (Sorry, it was late when I wrote that and I didn't double check for tone and politeness as I'd usually do.) |
glemaitre
left a comment
There was a problem hiding this comment.
Here comes another review. Once addressed, I would reevaluate the message of the example since I think we should remove the part about SAMME.R
|
Hi @glemaitre, I have extracted the SAMME.R algorithm and made a little comparison between the accuracies of a single DecisionTreeClassifier and boosted DecisionTreeClassifiers, as suggested. :) Maybe we should also add an interpretation of the last two plots. |
The intuition behind this is that the first classifier (or a couple of classifiers) will be stronger (with a lower error or a higher score). Since all samples have equal weights they will provide an answer for the general trends of the data. Later classifiers in the boosting chain will not have such a choice because due to the boosting reweighting, we force them to focus on the difficult samples. Let's for one second imagine that after the first classifier, only noisy samples remain misclassified, you will create classifiers that would try to find a specific rule for those samples without any attention to the majority of samples. So in practice, those classifiers will have a decrease in statistical performance. And to counterbalance that, you affect a lower weight when making the final additive model (since the weights (in binary case) are defined as That is why I would expect the error to increase and the associated weight to decrease. |
|
I will have a pass again and the full example now that you trimmed it. It will be easier to have targetted comment :). |
glemaitre
left a comment
There was a problem hiding this comment.
It looks like the example converges :)
So I made a full pass on the example and propose a couple of changes.
Co-authored-by: Guillaume Lemaitre <[email protected]>
Co-authored-by: Guillaume Lemaitre <[email protected]>
glemaitre
left a comment
There was a problem hiding this comment.
It looks good. Only some minor changes.
glemaitre
left a comment
There was a problem hiding this comment.
LGTM. I just made 2 small nitpicks and merge them directly.
This example is much better. Thanks a lot, @StefanieSenger.
Merging.
|
Oh, it was all for your support. :) Thanks. |
) Co-authored-by: Guillaume Lemaitre <[email protected]>
) Co-authored-by: Guillaume Lemaitre <[email protected]>
Co-authored-by: Guillaume Lemaitre <[email protected]>
) Co-authored-by: Guillaume Lemaitre <[email protected]>
What does this implement/fix? Explain your changes.
This PR suggests an improved formatting of the AdaBoostClassifier example, with code cell functionality.
I've also edited the text, so it becomes better understandable.