Time Series Analysis

I’m new with ROOT and I am trying to learn how to use TMultiLayerPerceptron to predict the future values of a time series. I used mlpHiggs.c, mlpRegression and mlpField.c as examples and a base for my case, but I am not getting good results.

Following the mlpField.c example, I create a tree reading the data from an ascii file. I then define the NN by replacing r and z for the two input variables of my problem, and @phi for the output variable for my case. When I run the macro, the learning process is interrupted after the 2nd or 3rd iteration, and a “line search fail” message is issued. The structure of the NN together with other information is displayed but the output of the NN is zero.

Could somebody help to see what I am doing wrong?. Has somebody worked before with predicting time series behavior and have some examples?.

Thank you

The message indicates that it was not able to find a minimum for the error function. When this appens at the beginning, it generaly means that there is a problem with your inputs and/or outputs.

First check that the variables are well filled in the TTree (you can draw 2D plots to check). If it does not solve your problem, try removing the ‘@’ (if you put one) of the output variable. Automatic normalization can fail in some cases (like for discrete variables).


Thanks for your reply. Problem with input/outputs was one of my problems. The training of the NN works now.

I have a question now about how to add (append) a variable to an existing tree. Do I have to post the question in a new topic?. Sorry for asking but I’m not well familiar with the forum’s rules.


see TTree::AddFriend root.cern.ch/root/html//TTree#TTree:AddFriend

Depending on how related your follow-up question is you can just re-use the same thread, no big deal. It’s just for giving other people a chance to find your question, if they run into a similar one.


Thank you