Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CombinedPrediction Class Reference

A combined trivial prediction method. More...

#include <prediction.h>

Inheritance diagram for CombinedPrediction:

PredictionStrategy List of all members.

Public Methods

virtual void make (const StringMap &params)
virtual void train (const Matrix &traindata, int startmonth)
virtual Ref< Matrix > predict (const Matrix &testdata, int startmonth) const

Detailed Description

A combined trivial prediction method.

A prediction method that combines the other trivial methods by first ranking their performance on each month in the training set, and then choosing the best ranking method to predict a particular month in a test set.

This has proven to be a rather good prediction method for many cases.

Definition at line 243 of file prediction.h.


Member Function Documentation

void make const StringMap &    params [virtual]
 

Initialization.

Reimplemented from PredictionStrategy.

Definition at line 346 of file prediction.cc.

References PredictionStrategy::make(), and PredictionStrategy::mInputMonths.

Ref< Matrix > predict const Matrix &    testdata,
int    startmonth
const [virtual]
 

Tests the data and returns the monthly predictions in matrix.

Must be implemented by prediction strategies.

Parameters:
startmonth  See train().

Reimplemented from PredictionStrategy.

Definition at line 442 of file prediction.cc.

void train const Matrix &    traindata,
int    startmonth
[virtual]
 

Trains the learning method with the given data.

Must be implemented by prediction strategies.

Parameters:
startmonth  Zero-based month number for the first sample in the data. The month number can be in range 0-11, but only the last two digits are interpreted as months, so it can have values like 199905 or 9905.

Reimplemented from PredictionStrategy.

Definition at line 370 of file prediction.cc.


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:06:45 2005 for Inanna by doxygen1.2.18