Hi, I have a question about making a roc curve using TMVA. I have an array of the known weights of some events:
known_weights = [1, 1, -1, 1, -1 ...]
and what my BDTs in TMVA evaluated those events to:
tmva_eval = [0.8, 0.5, -0.3 ...]
Is there an easy way to plot a roc curve (similar to trainingRejBvsS from TMVA’s output file) from these arrays?
It looks like this https://root.cern/doc/v614/ROCCurve_8cxx_source.html#l00056
may be what I’m looking for, but it’s not clear which of my arrays would be mvaValues and which would be mvaWeights, and I have no idea what mvaTargets would be.
Hi,
The ROCCurve class can receive as input a vector for the MVA (e.g. BDT) evaluated values for both signal and background, mvaValues and a boolean vector for targets, mvaTargets ( false for background, true for signal events) and a weight vector mvaWeights.
Otherwise you can also pass as input separate vectors for signal values, background values, signal weight values and background weight values.
Hope it is clear now, if not I can provide you an example