I am a beginner in ROOT and I try to analyze data on the income of adults in E.U. For being categorical variables I did a numeric equivalence, in particular, 1 if a person earn more of $50000 dollars annually and 2 if it doesn’t. I achieved to make neural networks (Thanks to my friend Xination) and decision trees with this. Now, I want to generate the ROC curve to compare the performance of these methods. I modified the code of TMVAClassification.C but I did not understand lines 216-223.
There is another way to generate ROC curves between these methods? Could you please give me a code example of that?
Thanks for your attention
Excuse my English mistakes and if you have any suggestions please tell me
Have a nice night
// After a standard set-up along the lines of:
TMVA::DataLoader d {"<datasetname>"};
TMVA::Factory f {"<jobname>", outputFile, "<options>"};
f.BookMethod(d, methodType, "<methodOptions>");
f.TrainAllMethods();
f.TestAllMethods();
f.EvaluateAllMethods();
// You can do this:
TMultiGraph* rocgraph = f.GetROCCurveAsMultiGraph("<datasetname>");
I added your line to my code and first I got an error “function not viable: requires 2 arguments, but 1 was provided TMultiGraph* GetROCCurveAsMultiGraph(DataLoader loader, UInt_t iClass);", then after read the TMVA::ROCCurve Class Reference online, I modified to "TMultiGraph rocgraph = factory->GetROCCurveAsMultiGraph(“wine.root”, 100);” and my macro runs, but I get “… Thanksfor using TMVA…*** Break *** segmentation violation”.
I accidentally pointed you to the wrong function. The one I meant is the following. Do also note that the string "<datasetname>" should be the same as what is given to the dataloader constructor.
auto roc = factory->GetROCCurve("<datasetname>");
roc->Draw();