Take the 2-minute tour ×


<< NeuralNetworks`
data = {Sin[#]} & /@ Range[0, 4 Pi, 0.5];
learn = data[[1 ;; 15]];

Now, lets fit our neural network:

{model1, fitrecord} = NeuralARFit[learn, 3, FeedForwardNet, {}, 0, CriterionPlot -> False]
p = NetPredict[learn, model1, PredictHorizon -> 1]
ListLinePlot[Flatten[learn~Join~p]] (* Plot it! *)

In the result the Length@p == Length@learn == 15. Is it true, that we predict 15 values? How can you predict only 1 or 2 or 3 values (e.g. p[[1]], p[[1;;2]], p[[1;;3]]) or an arbitrary n values?

Is it right the idea to use NeuralARXFit[d1,d2,...] and Dimensions@First@d2 = {N,3} if we want to predict only 3 values ?

share|improve this question
add comment

migrated from stackoverflow.com Jun 6 '12 at 2:53

This question came from our site for professional and enthusiast programmers.


Your Answer



Browse other questions tagged or ask your own question.