4

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
...
Thorin
  • 51
  • 1
  • 3

1 Answers1

5

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

Adam Gibson
  • 3,055
  • 1
  • 10
  • 12