Hi,
I have a question about TMultiLayerPerceptron.
I saved the output of NN on a ROOT file, now I want to use it, what is the way to do it?
In the ROOT file there are different objects, what I have to use?
Thank you very much
Ciccio
Hi,
I have a question about TMultiLayerPerceptron.
I saved the output of NN on a ROOT file, now I want to use it, what is the way to do it?
In the ROOT file there are different objects, what I have to use?
Thank you very much
Ciccio
Hi,
I tried to follow this way:
TFile *file = TFile::Open("OutputJetNNCorrTrain/NNoutput.root");
TMultiLayerPerceptron *mlp = (TMultiLayerPerceptron*)file.Get("TMultiLayerPerceptron");
Float_t params[9];
params[0]=et_corr_bjet1;
params[1]=pt_corr_bjet1;
params[2]=jet_trans_mass_bjet1;
params[3]=et_bjet1;
params[4]=sec_vtx_pt_bjet1;
params[5]=sec_vtx_l2d_bjet1;
params[6]=sec_vtx_dl2d_bjet1;
params[7]=track_sum_pt_bjet1;
params[8]=track_max_pt_bjet1;
float weight_nn = 1;
weight_nn = mlp->Evaluate(0, params);
but I obtain this error:
Error: Can't call TMultiLayerPerceptron::Evaluate(0,params) in current scope test/test_nncorr.c:46:
Possible candidates are...
(in TMultiLayerPerceptron)
/home/smwang/root/root_v5.22.00/lib/libMLP.so -1:-1 0 public: Double_t TMultiLayerPerceptron::Evaluate(Int_t index,Double_t* params) const;
*** Interpreter error recovered ***
do you have any idea?
Thank you
Ciccio
I am sorry, I have found my mistake I have defined “params” float and not double.
Sorry again
Ciccio