I have a Multiclass Dataset and I am getting probabilities of classes from RandomForest.

However, I want to divide the dataset for each class as examples of either the case belongs to that class or not(Binary Classification). I want to know , when I get the prediction of those models for a yes or no.

How can I ensemble them in such a way that Overall Sum of probabilities as one?


1 Answer 1


I think it can be done by using this command at the time of prediction, giving example in R

#To predict with probabilities

To take average of the predictions:


This Link , might be helpful. Do have a look.

Let me know if you have any additional questions.

  • $\begingroup$ Don't know about R. Working in python. Can you help me in that? $\endgroup$ Commented Nov 18, 2017 at 10:59
  • 1
    $\begingroup$ sure will have a look and update you in sometime. $\endgroup$
    – Toros91
    Commented Nov 18, 2017 at 11:00
  • 1
    $\begingroup$ Do go through this Link, here you have something called as Probability, clf3 = SVC(kernel='rbf', probability=True). I think that might work, have a look but i'm not sure. $\endgroup$
    – Toros91
    Commented Nov 18, 2017 at 11:12
  • 1
    $\begingroup$ @Toros91 It seems to me you are missing the essential part of OP's question which relates to handling probabilities out of a series of 1-vs-1 models defined from an original 1-vs-all problem setting. $\endgroup$
    – tagoma
    Commented Nov 18, 2017 at 14:56
  • 1
    $\begingroup$ yes, i understood that part, try giving Probabilities to False and see how it works. $\endgroup$
    – Toros91
    Commented Nov 18, 2017 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.