title: How can I use a custom data model with Deeplearning4j?
body: <p>The base problem is trying to use a custom data model to create a DataSetIterator to be used in a <a href="https://deeplearning4j.org/index.html" rel="noreferrer">deeplearning4j</a> network.</p>
  
  <p>The data model I am trying to work with is a java class that holds a bunch of doubles, created from quotes on a specific stock, such as timestamp, open, close, high, low, volume, technical indicator 1, technical indicator 2, etc.
  I query an internet source, <a href="https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&amp;symbol=MSFT&amp;interval=1min&amp;apikey=demo" rel="noreferrer">example</a>, (also several other indicators from the same site) which provide json strings that I convert into my data model for easier access and to store in an sqlite database.</p>
  
  <p>Now I have a List of these data models that I would like to use to train an LSTM network, each double being a feature. Per the Deeplearning4j documentation and several examples, the way to use training data is to use the ETL processes described <a href="https://deeplearning4j.org/etl-userguide" rel="noreferrer">here</a> to create a DataSetIterator which is then used by the network.</p>
  
  <p>I don't see a clean way to convert my data model using any of the provided RecordReaders without first converting them to some other format, such as a CSV or other file. I would like to avoid this because it would use up a lot of resources. It seems like there would be a better way to do this simple case. Is there a better approach that I am just missing?</p>