47 std::map<std::string,int> Use;
62 std::cout << std::endl;
63 std::cout <<
"==> Start TMVAMulticlass" << std::endl;
66 for (std::map<std::string,int>::iterator it = Use.begin(); it != Use.end(); it++) it->second = 0;
73 std::cout <<
"Method \"" <<
regMethod <<
"\" not known in TMVA under this name. Choose among the following:" << std::endl;
74 for (std::map<std::string,int>::iterator it = Use.begin(); it != Use.end(); it++) std::cout << it->first <<
" ";
75 std::cout << std::endl;
87 "!V:!Silent:Color:DrawProgressBar:Transformations=I;D;P;G,D:AnalysisType=multiclass" );
91 dataloader->AddVariable(
"var2",
"Variable 2",
"",
'F' );
92 dataloader->AddVariable(
"var3",
"Variable 3",
"units",
'F' );
93 dataloader->AddVariable(
"var4",
"Variable 4",
"units",
'F' );
96 TString fname =
gROOT->GetTutorialDir() +
"/machine_learning/data/tmva_multiclass_example.root";
101 std::cout <<
"ERROR: could not open data file" << std::endl;
104 std::cout <<
"--- TMVAMulticlass: Using input file: " <<
input->GetName() << std::endl;
117 dataloader->PrepareTrainingAndTestTree(
"",
"SplitMode=Random:NormMode=NumEvents:!V" );
124 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" );
132 "TestRepetitions=1,ConvergenceSteps=10,BatchSize=100,MaxEpochs=20");
134 "WeightInitialization=XAVIERUNIFORM:Architecture=GPU");
144 "TestRepetitions=1,ConvergenceSteps=10,BatchSize=100,MaxEpochs=20");
146 "WeightInitialization=XAVIERUNIFORM:Architecture=GPU");
169 std::cout <<
"==> Wrote root file: " <<
outputFile->GetName() << std::endl;
170 std::cout <<
"==> TMVAMulticlass is done!" << std::endl;
185 for (
int i=1; i<
argc; i++) {
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
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.
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.
MethodBase * BookMethod(DataLoader *loader, MethodName theMethodName, TString methodTitle, TString theOption="")
Books an MVA classifier or regression method.
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="")