Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deeplearning4j LSTM time series prediction example

I'm trying to do some simple time series prediction in Deeplearning4j, using an LSTM, but I'm having a hard time getting it working. I have a simple textfile with a list of numbers like below and would like the network to learn to predict the next number. Is there any example code for this? The Java examples I find all seem to be about image processing and classification.

112
118
132
129
121
135
148
...
like image 739
Thorin Avatar asked Oct 19 '25 15:10

Thorin


1 Answers

We already define a file format, input format, as well as how to split the time series here: https://github.com/deeplearning4j/dl4j-examples/blob/master/dl4j-examples/src/main/java/org/deeplearning4j/examples/recurrent/seqclassification/UCISequenceClassificationExample.java

I'm not sure where you looked - in general though, you can take this and just change the regression parameter in the recordreaderdatasetiterator to true and you're done. Either way, we have examples of nearly every use case. There are also numerous articles on the internet about our LSTMs (one that comes to mind is written by IBM, see: https://www.ibm.com/developerworks/library/iot-deep-learning-anomaly-detection-3/)

All of our examples are based in 1 repo.

Deeplearning4j's ETL pipelines all work the same. Datavec -> Iterator.

For more on datavec see: http://deeplearning4j.org/datavec as well as the associated examples.

We have tutorial notebooks here as well: https://github.com/deeplearning4j/deeplearning4j/tree/master/dl4j-examples/tutorials

like image 174
Adam Gibson Avatar answered Oct 25 '25 00:10

Adam Gibson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!