This tutorial shows how to apply a trained model to new data.
import torch
from ROOT import TMVA, TFile, TString, gROOT
from array import array
from subprocess import call
branches = {}
branches[branchName] = array('f', [-999])
def predict(model, test_X, batch_size=32):
predictions = []
X = data[0]
outputs = model(X)
load_model_custom_objects = {"optimizer": None, "criterion": None, "train_func": None, "predict_func": predict}
print('Some signal example classifications:')
print('')
print('Some background example classifications:')
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
The Reader class serves to use the MVAs in a specific analysis context.
- Date
- 2020
- Author
- Anirudh Dagar aniru.nosp@m.dhda.nosp@m.gar6@.nosp@m.gmai.nosp@m.l.com - IIT, Roorkee
Definition in file ApplicationClassificationPyTorch.py.