Question

I am beginner in Java programming and I needed to find some tool for predicting time series in Java. I didn't find anything better than open source Encog framework. It is now quite hard for me to understand some examples(e.g. PredictSunspot.java) from github.

I would be very thankful if anyone could explain how to make simple prediction: input numbers series 1,2,3,4,5 and so that predicted output would be 6. I am still looking through the documents to find classes I need. However with your help I think it would be faster.

Was it helpful?

Solution

Take the existing PredictSunspot.java. In there you will find the Sunspots array of doubles. Change this to the numbers 1 to 6, or better, say 1 to 100.
You will also see WindowSize = 30, this is the number of data points the network will consider at any time, you can bring this down to say 5 or 10. It corresponds to the number of input neurons.
In this example you can consider the year to be no more than a counter, its not used to train the network.
For another easy example you could try to train a sine wave.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top