TemporalNeuralDataSet and TemporalPoint question
When I create NN I come out from org.encog.examples.neural.predict.sunspot.PredictSunspot example. This is good example but there is one problem for me, this NN predicts only one value and my NN predicts more values. I'm not sure how adjust example for my requirements. This method creates the data set for training phase, I comment in my questions into the code.
public NeuralDataSet generateTrainingDataSet() {
List trainingData = Data.getTrainingData();
TemporalNeuralDataSet result = new TemporalNeuralDataSet(Config.INPUT_SIZE, Config.OUTPUT_SIZE);
// I do know if the last boolean parametr in TemporalDataDescription constructor should be true when
// this data set is used for training phase only? When I set the last parameter to false, this
// exception is throwed (why?)
// Exception in thread "Thread-1" java.lang.NullPointerException
// at org.encog.neural.networks.training.propagation.gradient.GradientUtil.calculate(Unknown Source)
// at org.encog.neural.networks.training.propagation.gradient.GradientWorker.run(Unknown Source)
// at java.lang.Thread.run(Thread.java:619)
result.addDescription(new TemporalDataDescription(TemporalDataDescription.Type.DELTA_CHANGE, true, true));
for (int index = Config.INPUT_SIZE; index < trainingData.size(); index++) {
// TemporalPoint constructors needs input size or output size integer? In PredictSunspot
// example there is 1 so I use output size(?)
TemporalPoint point = new TemporalPoint(Config.OUTPUT_SIZE);
point.setSequence(index);
// "for" is not in PredictSunspot example, there is only one value assignment so I pressume
// there is a need to set into to TemporalPoint object all output values?
for (int p = 0; p < Config.OUTPUT_SIZE; p++) {
int pointIndex = (index - Config.INPUT_SIZE) + p;
point.setData(p, trainingData.get(pointIndex));
}
result.getPoints().add(point);
}
result.generate();
return result;
}
Please correct me if am I doing something incorrectly.



