[scikit-learn] random forests and multil-class probability

Sole Galli solegalli at protonmail.com
Tue Jul 27 05:08:18 EDT 2021

Hello community,

Do I understand correctly that Random Forests are trained as a 1 vs rest when the target has more than 2 classes? Say the target takes values 0, 1 and 2, then the model would train 3 estimators 1 per class under the hood?.

The predict_proba output is an array with 3 columns, containing the probability of each class. If it is 1 vs rest. am I correct to assume that the sum of the probabilities for the 3 classes should not necessarily add up to 1? are they normalized? how is it done so that they do add up to 1?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scikit-learn/attachments/20210727/d9ee8174/attachment.html>

More information about the scikit-learn mailing list