ROOT Version: 6.24
Platform: VSCode
Compiler: macOS C++ Compiler
Hi,
I’m trying to practice the basics of Root. I followed along with the TMVAClassification tutorial, and I got that to work. Now, I’m trying to use my own data to create a ML model. But I keep getting this error:
DataSetInfo : [dataset] : Added class “Signal”
: Add Tree signalTree of type Signal with 0 events
<FATAL> : Encountered empty TTree or TChain of class Signal
This is confusing me because this is the code responsible:
auto fileName = "./student-mat-signal.csv";
auto rdf = ROOT::RDF::MakeCsvDataFrame(fileName, true, ',');
TTree *signalTree = new TTree("signalTree","Signals");
rdf.Snapshot("signalTree", "signalMathScores.root");
.
.
.
TMVA::DataLoader *dataloader=new TMVA::DataLoader("dataset");
dataloader->AddVariable( "G1" );
dataloader->AddVariable( "G3" );
Double_t signalWeight = 1.0;
dataloader->AddSignalTree(signalTree, signalWeight );
The signalMathScores.root file that gets created isn’t empty, so I don’t understand why the dataloader says there’s 0 events. Any ideas on what the problem could be?