|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.data.basic.BasicMLDataSet
org.encog.neural.data.basic.BasicNeuralDataSet
org.encog.ml.data.temporal.TemporalMLDataSet
public class TemporalMLDataSet
This class implements a temporal neural data set. A temporal neural dataset is designed to use a neural network to predict. A temporal dataset is a stream of data over a time range. This time range is broken up into "points". Each point can contain one or more values. These values are either the values that you would like to predict, or use to predict. It is possible for a value to be both predicted and used to predict. For example, if you were trying to predict a trend in a stock's price fluctuations you might very well use the security price for both. Each point that we have data for is stored in the TemporalPoint class. Each TemporalPoint will contain one more data values. These data values are described by the TemporalDataDescription class. For example, if you had five TemporalDataDescription objects added to this class, each Temporal point object would contain five values. Points are arranged by sequence number. No two points can have the same sequence numbers. Methods are provided to allow you to add points using the Date class. These dates are resolved to sequence number using the level of granularity specified for this class. No two points can occupy the same granularity increment.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.encog.ml.data.basic.BasicMLDataSet |
---|
BasicMLDataSet.BasicMLIterator |
Field Summary | |
---|---|
static String |
ADD_NOT_SUPPORTED
Error message: adds are not supported. |
Constructor Summary | |
---|---|
TemporalMLDataSet(int inputWindowSize,
int predictWindowSize)
Construct a dataset. |
Method Summary | |
---|---|
void |
add(MLData data)
Adding directly is not supported. |
void |
add(MLData inputData,
MLData idealData)
Adding directly is not supported. |
void |
add(MLDataPair inputData)
Adding directly is not supported. |
void |
addDescription(TemporalDataDescription desc)
Add a data description. |
int |
calculateActualSetSize()
Calculate the actual set size, this is the number of training set entries that will be generated. |
void |
calculateNeuronCounts()
Calculate how many input and output neurons will be needed for the current data. |
int |
calculatePointsInRange()
Calculate how many points are in the high and low range. |
int |
calculateStartIndex()
Calculate the index to start at. |
void |
clear()
Clear the entire dataset. |
TemporalPoint |
createPoint(Date when)
Create a temporal point from a time. |
TemporalPoint |
createPoint(int sequence)
Create a temporal data point using a sequence number. |
void |
generate()
Generate the training sets. |
BasicNeuralData |
generateInputNeuralData(int index)
Generate input neural data for the specified index. |
BasicNeuralData |
generateOutputNeuralData(int index)
Generate neural ideal data for the specified index. |
List<TemporalDataDescription> |
getDescriptions()
|
int |
getDesiredSetSize()
|
int |
getHighSequence()
|
int |
getInputNeuronCount()
|
int |
getInputWindowSize()
|
int |
getLowSequence()
|
int |
getOutputNeuronCount()
|
List<TemporalPoint> |
getPoints()
|
int |
getPredictWindowSize()
|
int |
getSequenceFromDate(Date when)
Create a sequence number from a time. |
TimeUnit |
getSequenceGrandularity()
|
Date |
getStartingPoint()
|
boolean |
isPointInRange(TemporalPoint point)
Is the specified point within the range. |
void |
setDesiredSetSize(int desiredSetSize)
|
void |
setHighSequence(int highSequence)
|
void |
setInputWindowSize(int inputWindowSize)
|
void |
setLowSequence(int lowSequence)
|
void |
setPredictWindowSize(int predictWindowSize)
|
void |
setSequenceGrandularity(TimeUnit sequenceGrandularity)
|
void |
setStartingPoint(Date startingPoint)
|
void |
sortPoints()
Sort the points. |
Methods inherited from class org.encog.ml.data.basic.BasicMLDataSet |
---|
clone, close, get, getData, getIdealSize, getInputSize, getRecord, getRecordCount, isSupervised, iterator, openAdditional, setData, size, toList |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.encog.ml.data.MLDataSet |
---|
close, get, getIdealSize, getInputSize, getRecord, getRecordCount, isSupervised, openAdditional, size |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Field Detail |
---|
public static final String ADD_NOT_SUPPORTED
Constructor Detail |
---|
public TemporalMLDataSet(int inputWindowSize, int predictWindowSize)
inputWindowSize
- What is the input window size.predictWindowSize
- What is the prediction window size.Method Detail |
---|
public void add(MLData data)
add
in interface MLDataSet
add
in class BasicMLDataSet
data
- Not used.public void add(MLData inputData, MLData idealData)
add
in interface MLDataSet
add
in class BasicMLDataSet
inputData
- Not used.idealData
- Not used.public void add(MLDataPair inputData)
add
in interface MLDataSet
add
in class BasicMLDataSet
inputData
- Not used.public void addDescription(TemporalDataDescription desc)
desc
- The data description to add.public int calculateActualSetSize()
public void calculateNeuronCounts()
public int calculatePointsInRange()
public int calculateStartIndex()
public void clear()
public TemporalPoint createPoint(Date when)
when
- The time that this point should be created at.
public TemporalPoint createPoint(int sequence)
sequence
- The sequence number.
public void generate()
public BasicNeuralData generateInputNeuralData(int index)
index
- The index to generate neural data for.
public BasicNeuralData generateOutputNeuralData(int index)
index
- The index to generate for.
public List<TemporalDataDescription> getDescriptions()
public int getDesiredSetSize()
public int getHighSequence()
public int getInputNeuronCount()
public int getInputWindowSize()
public int getLowSequence()
public int getOutputNeuronCount()
public List<TemporalPoint> getPoints()
public int getPredictWindowSize()
public int getSequenceFromDate(Date when)
when
- The date to generate the sequence number for.
public TimeUnit getSequenceGrandularity()
public Date getStartingPoint()
public boolean isPointInRange(TemporalPoint point)
point
- The point to consider.
public void setDesiredSetSize(int desiredSetSize)
desiredSetSize
- the desiredSetSize to setpublic void setHighSequence(int highSequence)
highSequence
- the highSequence to setpublic void setInputWindowSize(int inputWindowSize)
inputWindowSize
- the inputWindowSize to setpublic void setLowSequence(int lowSequence)
lowSequence
- the lowSequence to setpublic void setPredictWindowSize(int predictWindowSize)
predictWindowSize
- the predictWindowSize to setpublic void setSequenceGrandularity(TimeUnit sequenceGrandularity)
sequenceGrandularity
- the sequenceGrandularity to setpublic void setStartingPoint(Date startingPoint)
startingPoint
- the startingPoint to setpublic void sortPoints()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |