LTI-Lib latest version v1.9 - last update 24 Nov 2005
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

lti::crossValidator Class Reference

This class does a cross validation on the given dataset and returns the average recognition rates. More...

#include <ltiCrossValidator.h>

Inheritance diagram for lti::crossValidator:

Inheritance graph
[legend]
Collaboration diagram for lti::crossValidator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 crossValidator ()
 crossValidator (const crossValidator &other)
virtual ~crossValidator ()
virtual const char * getTypeName () const
double apply (const dmatrix &data, const ivector &ids) const
bool apply (const dmatrix &data, const ivector &ids, double &avRecogRate) const
crossValidatorcopy (const crossValidator &other)
crossValidatoroperator= (const crossValidator &other)
virtual functorclone () const
const parametersgetParameters () const

Protected Member Functions

bool splitData (const dmatrix &data, std::list< ivector > &splittedData) const

Classes

class  parameters
 the parameters for the class crossValidator More...

Detailed Description

This class does a cross validation on the given dataset and returns the average recognition rates.

It divides the data at random in nbOfSplits distinct segments. Then the network is trained with nbOfSplits-1 of the segments. Then each data point of the remaining segment is classified. This process is repeated for every possible choice of the the segment which is omited from the classification process. The classifier that is used for validation is expected to delete old results from previous trainings, because the classifier is trained with different training data set during validation.


Constructor & Destructor Documentation

lti::crossValidator::crossValidator  ) 
 

default constructor

lti::crossValidator::crossValidator const crossValidator other  ) 
 

copy constructor

Parameters:
other the object to be copied

virtual lti::crossValidator::~crossValidator  )  [virtual]
 

destructor


Member Function Documentation

bool lti::crossValidator::apply const dmatrix data,
const ivector ids,
double &  avRecogRate
const
 

Computes the average the average recognition rate of the given data using the specified classifier.

Parameters:
data dmatrix with the source data.
ids ivector with the ids of each data point in data.
avRecogRate the average recognition rate
Returns:
true if apply successful or false otherwise.

double lti::crossValidator::apply const dmatrix data,
const ivector ids
const
 

Computes the average the average recognition rate of the given data using the specified classifier.

Parameters:
data dmatrix with the source data.
ids ivector with the ids of each data point in data.
Returns:
the average recogntion rate

virtual functor* lti::crossValidator::clone  )  const [virtual]
 

returns a pointer to a clone of this functor.

Implements lti::functor.

crossValidator& lti::crossValidator::copy const crossValidator other  ) 
 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

const parameters& lti::crossValidator::getParameters  )  const
 

returns used parameters

Reimplemented from lti::functor.

virtual const char* lti::crossValidator::getTypeName  )  const [virtual]
 

returns the name of this type ("crossValidator")

Reimplemented from lti::functor.

crossValidator& lti::crossValidator::operator= const crossValidator other  ) 
 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

bool lti::crossValidator::splitData const dmatrix data,
std::list< ivector > &  splittedData
const [protected]
 

Splits the given data into parts.

The points are randomly drawn from the the src data.


The documentation for this class was generated from the following file:
Generated on Thu Nov 24 16:31:30 2005 for LTI-Lib by Doxygen 1.4.4