# Performance of binary projection of Multiclass classifier (BDTG)

**URL:** <https://root-forum.cern.ch/t/performance-of-binary-projection-of-multiclass-classifier-bdtg/31579>\
**Category:** TMVA\
**Created:** [November 14, 2018, 9:41am UTC](https://root-forum.cern.ch/t/performance-of-binary-projection-of-multiclass-classifier-bdtg/31579 "2018-11-14T09:41:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmilesi](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@mmilesi](https://root-forum.cern.ch/u/mmilesi)\
**Post date:** [November 14, 2018, 9:41am UTC](https://root-forum.cern.ch/t/performance-of-binary-projection-of-multiclass-classifier-bdtg/31579/1 "2018-11-14T09:41:48Z")

</div>

Hi TMVA experts,

I am playing around with the TMVAMulticlass analysis mode (disclaimer: I have no experience with it), training a BDTG to separate four classes of events : e, mu, pi, K.

If I check the classifier response and ROC curve for a specific “binary projection”, say “e VS pi”, I am getting substantially worse performance than using the same BDTG trained w/ the normal binary Classification mode.  
In both cases, the e and pi input samples contain the same number of events, and the training/testing splitting is done w/ same proportions (80% train, 20% test).

Naively I would have expected to get same results…why is not so? See the attached image.

Thanks for your help.

Marco

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/2/a/2a975908160f76538a9c127d12ae5a20ae35050f.png)

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [November 14, 2018, 1:37pm UTC](https://root-forum.cern.ch/t/performance-of-binary-projection-of-multiclass-classifier-bdtg/31579/2 "2018-11-14T13:37:25Z")

</div>

Hi,

We are happy to help with any questions you might have!

I think a key realisation in reasoning about multiclass output is that the axis-aligned 1D projections simplify the original space too much. The output of the classifier (classifier-space) is, in your case, 3 dimensional (assuming the probabilities sum to 1 😉 ). In the binary classification case the output space is 1D.

When constructing the ROC curve one has to iterate over all possible (connected) partitions of the classifier-space and record the achievable efficiences. For the 1D case this means you only need to consider point cuts while in the 2D case you must iterate over all 1-d curves cutting the space. For 3D one needs to consider 2D-curves. A simple, but effective, approximation is considering D simultaneous point cuts, one for each axis.

Currently TMVA does not support this out-of-the-box (but might in the future) so you would have to do this optimisation in your own code. I could provide some guidance here should you need it.

Cheers,  
Kim
