#include <CrossValidation.h>

Public Member Functions | |
| CVModel (Array< Model * > &models) | |
| Constructor. | |
| CVModel (unsigned int folds, Model *basemodel) | |
| Constructor. | |
| ~CVModel () | |
| Destructor. | |
| void | setParameter (unsigned int index, double value) |
| Modifies a specific model parameter. | |
| int | getBaseModels () |
| Get the number of base models in use. | |
| void | setBaseModel (int index) |
| Set the currently used base model. | |
| Model & | getBaseModel () |
| Return a reference to the current base model. | |
| void | model (const Array< double > &input, Array< double > &output) |
| The base model is used for model computations. | |
| void | modelDerivative (const Array< double > &input, Array< double > &derivative) |
| The base model is used for model computations. | |
| void | modelDerivative (const Array< double > &input, Array< double > &output, Array< double > &derivative) |
| The base model is used for model computations. | |
| bool | isFeasible () |
| Check whether the parameters define a valid model. | |
Protected Attributes | |
| Array< Model * > | baseModel |
| Models used for the data splits. | |
| int | baseModelIndex |
| Index of the baseModel to use. | |
Definition at line 227 of file CrossValidation.h.
| CVModel::CVModel | ( | Array< Model * > & | models | ) |
Constructor.
| models | Array of identical base models. There must be as many models in the array as there are cross validation partitions. |
Definition at line 303 of file CrossValidation.cpp.
References baseModel, baseModelIndex, Model::getParameterDimension(), i, and Model::parameter.
| CVModel::CVModel | ( | unsigned int | folds, | |
| Model * | basemodel | |||
| ) |
Constructor.
| models | base model used for all folds simultaneously. |
Definition at line 322 of file CrossValidation.cpp.
References baseModel, baseModelIndex, Model::getParameter(), Model::getParameterDimension(), and Model::parameter.
| CVModel::~CVModel | ( | ) |
| Model& CVModel::getBaseModel | ( | ) | [inline] |
Return a reference to the current base model.
Definition at line 269 of file CrossValidation.h.
References baseModel, and baseModelIndex.
Referenced by CVError::error(), CVError::errorDerivative(), and isFeasible().
| int CVModel::getBaseModels | ( | ) | [inline] |
Get the number of base models in use.
Definition at line 260 of file CrossValidation.h.
References baseModel.
| bool CVModel::isFeasible | ( | ) | [virtual] |
Check whether the parameters define a valid model.
Reimplemented from Model.
Definition at line 368 of file CrossValidation.cpp.
References getBaseModel(), and Model::isFeasible().
| void CVModel::model | ( | const Array< double > & | input, | |
| Array< double > & | output | |||
| ) | [virtual] |
The base model is used for model computations.
Implements Model.
Definition at line 353 of file CrossValidation.cpp.
References baseModel, and baseModelIndex.
| void CVModel::modelDerivative | ( | const Array< double > & | input, | |
| Array< double > & | output, | |||
| Array< double > & | derivative | |||
| ) | [virtual] |
The base model is used for model computations.
Reimplemented from Model.
Definition at line 363 of file CrossValidation.cpp.
References baseModel, and baseModelIndex.
| void CVModel::modelDerivative | ( | const Array< double > & | input, | |
| Array< double > & | derivative | |||
| ) | [virtual] |
The base model is used for model computations.
Reimplemented from Model.
Definition at line 358 of file CrossValidation.cpp.
References baseModel, and baseModelIndex.
| void CVModel::setBaseModel | ( | int | index | ) |
Set the currently used base model.
Definition at line 347 of file CrossValidation.cpp.
References baseModel, and baseModelIndex.
Referenced by CVError::error(), and CVError::errorDerivative().
| void CVModel::setParameter | ( | unsigned int | index, | |
| double | value | |||
| ) | [virtual] |
Modifies a specific model parameter.
Reimplemented from Model.
Definition at line 339 of file CrossValidation.cpp.
Array<Model*> CVModel::baseModel [protected] |
Models used for the data splits.
Definition at line 288 of file CrossValidation.h.
Referenced by CVModel(), getBaseModel(), getBaseModels(), model(), modelDerivative(), setBaseModel(), and setParameter().
int CVModel::baseModelIndex [protected] |
Index of the baseModel to use.
Definition at line 291 of file CrossValidation.h.
Referenced by CVModel(), getBaseModel(), model(), modelDerivative(), and setBaseModel().