#include <prediction.h>
Inheritance diagram for PredictionStrategy:
Public Methods | |
virtual void | make (const StringMap ¶ms) |
virtual void | train (const Matrix &traindata, int startmonth) |
virtual Ref< Matrix > | predict (const Matrix &testdata, int startmonth) const |
virtual PredictionTestResults * | test (const Matrix &testdata, int startmonth) const |
virtual void | testCurve (const Matrix &testdata, int startmonth, const String &filename) const |
const String & | name () const |
Static Protected Methods | |
Ref< Matrix > | rowDeltas (const Matrix &matrix) |
Protected Attributes | |
int | mInputMonths |
Design Patterns: Strategy.
Definition at line 146 of file prediction.h.
|
Initialization.
Reimplemented in CombinedPrediction, AbsoluteNeuralPrediction, and StochasticPrediction. Definition at line 139 of file prediction.cc. References mInputMonths. Referenced by AbsoluteNeuralPrediction::make(), and CombinedPrediction::make(). |
|
Returns the name of the prediction method.
Definition at line 159 of file prediction.h. |
|
Tests the data and returns the monthly predictions in matrix. Must be implemented by prediction strategies.
Reimplemented in PreviousYear, PreviousYearsAvg, AverageDeltaPrediction, CombinedPrediction, ZeroDeltaPrediction, AbsoluteNeuralPrediction, DeltaNeuralPrediction, and StochasticPrediction. Definition at line 165 of file prediction.cc. Referenced by test(). |
|
Calculates row deltas (differences between rows) for a matrix. Row delta is the change in a column between two rows, that is, Deltas[r,c] = M[r+1,c] - M[r,c].
Definition at line 236 of file prediction.cc. Referenced by AverageDeltaPrediction::train(). |
|
Tests the learning method with the given data.
Definition at line 186 of file prediction.cc. References PredictionTestResults::addValue(), PredictionTestResults::calculate(), PredictionTestResults::make(), and predict(). |
|
Tests the data and plots the result as a curve with GnuPlot.
Definition at line 224 of file prediction.cc. |
|
Trains the learning method with the given data. Must be implemented by prediction strategies.
Reimplemented in PreviousYear, PreviousYearsAvg, AverageDeltaPrediction, CombinedPrediction, ZeroDeltaPrediction, AbsoluteNeuralPrediction, DeltaNeuralPrediction, and StochasticPrediction. Definition at line 152 of file prediction.cc. |
|
Number of months to be used as prediction inputs before the first predicted month. The testdata contains these patterns in the beginning in the set. Definition at line 169 of file prediction.h. Referenced by CombinedPrediction::make(), make(), and AbsoluteNeuralPrediction::makeSet(). |