51 std::map<std::string,int> Use;
66 std::cout << std::endl;
67 std::cout <<
"==> Start TMVAMulticlass" << std::endl;
70 for (std::map<std::string,int>::iterator it = Use.begin(); it != Use.end(); it++) it->second = 0;
77 std::cout <<
"Method \"" <<
regMethod <<
"\" not known in TMVA under this name. Choose among the following:" << std::endl;
78 for (std::map<std::string,int>::iterator it = Use.begin(); it != Use.end(); it++) std::cout << it->first <<
" ";
79 std::cout << std::endl;
91 "!V:!Silent:Color:DrawProgressBar:Transformations=I;D;P;G,D:AnalysisType=multiclass" );
95 dataloader->AddVariable(
"var2",
"Variable 2",
"",
'F' );
96 dataloader->AddVariable(
"var3",
"Variable 3",
"units",
'F' );
97 dataloader->AddVariable(
"var4",
"Variable 4",
"units",
'F' );
100 TString fname =
gROOT->GetTutorialDir() +
"/machine_learning/data/tmva_multiclass_example.root";
105 std::cout <<
"ERROR: could not open data file" << std::endl;
108 std::cout <<
"--- TMVAMulticlass: Using input file: " <<
input->GetName() << std::endl;
121 dataloader->PrepareTrainingAndTestTree(
"",
"SplitMode=Random:NormMode=NumEvents:!V" );
128 factory->
BookMethod(
dataloader,
TMVA::Types::kFDA,
"FDA_GA",
"H:!V:Formula=(0)+(1)*x0+(2)*x1+(3)*x2+(4)*x3:ParRanges=(-1,1);(-10,10);(-10,10);(-10,10);(-10,10):FitMethod=GA:PopSize=300:Cycles=3:Steps=20:Trim=True:SaveBestGen=1" );
136 "TestRepetitions=1,ConvergenceSteps=10,BatchSize=100,MaxEpochs=20");
138 "WeightInitialization=XAVIERUNIFORM:Architecture=GPU");
148 "TestRepetitions=1,ConvergenceSteps=10,BatchSize=100,MaxEpochs=20");
150 "WeightInitialization=XAVIERUNIFORM:Architecture=GPU");
173 std::cout <<
"==> Wrote root file: " <<
outputFile->GetName() << std::endl;
174 std::cout <<
"==> TMVAMulticlass is done!" << std::endl;
189 for (
int i=1; i<
argc; i++) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
R__EXTERN TSystem * gSystem
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
This is the main MVA steering class.
void TrainAllMethods()
Iterates through all booked methods and calls training.
MethodBase * BookMethod(DataLoader *loader, TString theMethodName, TString methodTitle, TString theOption="")
Book a classifier or regression method.
void TestAllMethods()
Evaluates all booked methods on the testing data and adds the output to the Results in the corresponi...
void EvaluateAllMethods(void)
Iterates over all MVAs that have been booked, and calls their evaluation methods.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
A TTree represents a columnar dataset.
create variable transformations
void TMVAMultiClassGui(const char *fName="TMVAMulticlass.root", TString dataset="")