18from xgboost
import XGBClassifier
23from tmva100_DataPreparation
import variables
26def load_data(signal_filename, background_filename):
32 x_sig =
np.vstack([data_sig[var]
for var
in variables]).T
33 x_bkg =
np.vstack([data_bkg[var]
for var
in variables]).T
42 num_all = num_sig + num_bkg
47if __name__ ==
"__main__":
49 x, y, w =
load_data(
"train_signal.root",
"train_background.root")
56 print(
"Training done on ",
x.shape[0],
"events. Saving model in tmva101.root")
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...