org.encog.ml.data.market
Class MarketMLDataSet
java.lang.Object
org.encog.ml.data.basic.BasicMLDataSet
org.encog.neural.data.basic.BasicNeuralDataSet
org.encog.ml.data.temporal.TemporalMLDataSet
org.encog.ml.data.market.MarketMLDataSet
- All Implemented Interfaces:
- Serializable, Iterable<MLDataPair>, MLDataSet, NeuralDataSet
public class MarketMLDataSet
- extends TemporalMLDataSet
A data set that is designed to hold market data. This class is based on the
TemporalNeuralDataSet. This class is designed to load financial data from
external sources. This class is designed to track financial data across days.
However, it should be usable with other levels of granularity as well.
- Author:
- jheaton
- See Also:
- Serialized Form
Constructor Summary |
MarketMLDataSet(MarketLoader loader,
int inputWindowSize,
int predictWindowSize)
Construct a market data set object. |
Methods inherited from class org.encog.ml.data.temporal.TemporalMLDataSet |
add, add, add, calculateActualSetSize, calculateNeuronCounts, calculatePointsInRange, calculateStartIndex, clear, createPoint, generate, generateInputNeuralData, generateOutputNeuralData, getDescriptions, getDesiredSetSize, getHighSequence, getInputNeuronCount, getInputWindowSize, getLowSequence, getOutputNeuronCount, getPoints, getPredictWindowSize, getSequenceFromDate, getSequenceGrandularity, getStartingPoint, isPointInRange, setDesiredSetSize, setHighSequence, setInputWindowSize, setLowSequence, setPredictWindowSize, setSequenceGrandularity, setStartingPoint, sortPoints |
Methods inherited from class org.encog.ml.data.basic.BasicMLDataSet |
clone, close, get, getData, getIdealSize, getInputSize, getRecord, getRecordCount, isSupervised, iterator, openAdditional, setData, size, toList |
MarketMLDataSet
public MarketMLDataSet(MarketLoader loader,
int inputWindowSize,
int predictWindowSize)
- Construct a market data set object.
- Parameters:
loader
- The loader to use to get the financial data.inputWindowSize
- The input window size, that is how many datapoints do we use
to predict.predictWindowSize
- How many datapoints do we want to predict.
addDescription
public void addDescription(TemporalDataDescription desc)
- Add one description of the type of market data that we are seeking at
each datapoint.
- Overrides:
addDescription
in class TemporalMLDataSet
- Parameters:
desc
- The data description.
createPoint
public TemporalPoint createPoint(Date when)
- Create a datapoint at the specified date.
- Overrides:
createPoint
in class TemporalMLDataSet
- Parameters:
when
- The date to create the point at.
- Returns:
- Returns the TemporalPoint created for the specified date.
generateInputForPrediction
public NeuralData generateInputForPrediction(Date date)
- To be implemented later.
- Parameters:
date
- NOT USED
- Returns:
- NOT USED
getLoader
public MarketLoader getLoader()
- Returns:
- The loader that is being used for this set.
load
public void load(Date begin,
Date end)
- Load data from the loader.
- Parameters:
begin
- The beginning date.end
- The ending date.
Copyright © 2014. All Rights Reserved.