Fill NTuple for MLP

Hi,
I am trying to create a Neural Network with 576 st input variables and one output to identify a signal in a picture. From the tutorials “mlpHiggs.C” and “MLPRegression.C” I found that you input the training data by command

train = ROOT.TNtuple("data","data","X:type")

But here I am a bit unsure how to declare that “X” is suppose to be a vector with 576 st elements. So far I have tried to store my training data with the line.

train.Fill(x,y)

But I am unable to have “x” in the correct format. It dose not accept numpy arrays, list or strings. Dose some one know what format I must have on the “x vector” in order to use “.Fill”.

Thanks,
-Fredrik

Hi Fredrik,

the TNtuple is designed to store rows of individual single precision floating point numbers.
I see two solutions. The former is to switch to a TTree, which will allow you to store stl vectors in its branches and the latter is to have 576 columns in the TNtuple itself.

Cheers,
Danilo

Thanks for response Danilo,

And your advice sounds good, I have not tried the solution you mention since other solution came which drastically reduced my number of input and had promising results. I might get back to this specific example later though, I post in that case.

-Fredrik