Hi,
Unfortunately I noticed that the function TMVA::Factory::GetROCCurve
is missing a parameter specifying the number of points (the default is 100).
I will add this option. As a workaround the solution is to create the ROC curve from the TMVA output fil.
Here is an example on how to do from the outputfile of TMVAClassification.C
for the BDT method.
TFile f("TMVA.root");
auto TestTree = (TTree*) f.Get("dataset/TestTree");
// retrieve from the Testing tree the mva output plus weight and class id
int n = TestTree->Draw("BDT:weight:classID","");
// fill vector for the 3 quantities
std::vector<float> mvas(TestTree->GetV1(), TestTree->GetV1()+n);
std::vector<float> weights(TestTree->GetV2(), TestTree->GetV2()+n);
std::vector<bool> targets(TestTree->GetV3(), TestTree->GetV3()+n);
// classID ==0 is signal , instead for ROC target==1 is considered signal
// need to flip boolean vector
targets.flip();
TMVA::ROCCurve roc( mvas, targets,weights);
// get a graph given number of points (e.g. 1000)
auto curve = roc.GetROCCurve(1000);
curve->Draw();
Lorenzo