Sets of variables for NN training

Hi!

I would like to compare 2 different sets of input variables for NN.

TMultiLayerPerceptron::Train(Int_t nEpoch, Option_t * option) can draw the grafs with errors for each NN separately.

Is it possible to draw grafs with errors vs epoch for 2 different sets variables in 1 plot?

Best regards,
Natalia.

It’s not possible directly, but ROOT can give you the TGraph so that you can redraw it afterwards.

I don’t know the best solution for that (a TGraph is not named by default).
One trick is to save the canvas in a .C file for each NN, and then merge the two files.

You can also dump the TGraph (click on it on the canvas, select dump). You will get:
==> Dumping object at: 0x09ae9ac8, name=Graph, class=TGraph

Then do:
new TCanvas;
TGraph* g = (TGraph*)0x09ae9ac8;
root [3] g->Draw(“al”);

Maybe somebody else can give you a better solution.

Cheers,
Christophe.

Thanks a lot, Christophe. It can help me.

Do you plan to implement such option in future?
The comparison between errors of NN during training can be very usefull for different optimizations of NN. And sometimes one needs to compare a lot of grafs with errors on 1 plot…

It would be very nice if this possibility exists in the class.

Best regards,
Natalia.

Christophe,

When a TGraph is created, its default name is “Graph”.
You can name a graph by calling graph->SetName(“aname”), such
that you can retrieve it easily from the list of primitives in a pad via
TGraph gr = (TGraph)gPad->GetPrimitive(“aname”);

Rene