15void tmva004_RStandardScaler()
20 std::string inputFile = std::string(
gROOT->GetTutorialDir()) +
"/machine_learning/data/tmva_class_example.root";
32 TH1F h1(
"h1",
";x_{4};N_{Events}", 20, -4, 4);
33 TH1F h2(
"h2",
";x_{4};N_{Events}", 20, -4, 4);
34 for (std::size_t i = 0; i <
x.GetShape()[0]; i++) {
41 h2.SetLineColor(
kBlue);
44 auto c =
new TCanvas(
"",
"", 800, 800);
48 TLegend legend(0.7, 0.7, 0.89, 0.89);
49 legend.SetBorderSize(0);
50 legend.AddEntry(
"h1",
"Unscaled",
"l");
51 legend.AddEntry(
"h2",
"Scaled",
"l");
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
1-D histogram with a float per channel (see TH1 documentation)
void Fit(const RTensor< T > &x)
std::vector< T > Compute(const std::vector< T > &x)
RTensor< T > AsTensor(U &dataframe, std::vector< std::string > columns={}, MemoryLayout layout=MemoryLayout::RowMajor)
Convert the content of an RDataFrame to an RTensor.