This example explains how to use the cross-validation feature of TMVA.
It is validated the Fisher algorithm with a 5-fold cross-validation.
- Project : TMVA - a Root-integrated toolkit for multivariate data analysis
- Package : TMVA
- Exectuable: TMVACrossValidation
Processing /mnt/build/workspace/root-makedoc-v608/rootspi/rdoc/src/v6-08-00-patches/tutorials/tmva/TMVACrossValidation.C...
DataSetInfo : [dataset] : Added class "Signal"
: Add Tree TreeS of type Signal with 6000 events
DataSetInfo : [dataset] : Added class "Background"
: Add Tree TreeB of type Background with 6000 events
: Dataset[dataset] : Class index : 0 name : Signal
: Dataset[dataset] : Class index : 1 name : Background
: Evaluate method: Fisher
: Evaluation done.
<HEADER> CrossValidation : ==== Results ====
: Fold 0 ROC-Int : 0.9121
: Fold 1 ROC-Int : 0.8909
: Fold 2 ROC-Int : 0.8928
: Fold 3 ROC-Int : 0.8941
: Fold 4 ROC-Int : 0.8840
: ------------------------
: Average ROC-Int : 0.8948
: Std-Dev ROC-Int : 0.0104
void TMVACrossValidation()
{
TString fname =
"./tmva_class_example.root";
gSystem->
Exec(
"curl -O http://root.cern.ch/files/tmva_class_example.root");
cv.Evaluate();
}
{
TMVACrossValidation();
}
- Author
- Stefan Wunsch
Definition in file TMVACrossValidation.C.