latest version v1.9 - last update 10 Apr 2010 |
This class implements the most common decision function: Each node has a real-valued threshold in one dimension only. More...
#include <ltiCrispDecisionTree.h>
Public Member Functions | |
univariateCrispDecisionFunction () | |
univariateCrispDecisionFunction (const int &dim, const double &thresh) | |
univariateCrispDecisionFunction (const univariateCrispDecisionFunction &other) | |
~univariateCrispDecisionFunction () | |
const char * | getTypeName () const |
univariateCrispDecisionFunction & | copy (const univariateCrispDecisionFunction &other) |
univariateCrispDecisionFunction & | operator= (const univariateCrispDecisionFunction &other) |
virtual crispDecisionFunction * | clone () const |
virtual bool | apply (const dvector &data) const |
void | setCondition (const int &dim, const double &thresh) |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
Protected Attributes | |
int | dimension |
double | threshold |
This class implements the most common decision function: Each node has a real-valued threshold in one dimension only.
lti::crispDecisionTree::univariateCrispDecisionFunction::univariateCrispDecisionFunction | ( | ) |
default constructor
lti::crispDecisionTree::univariateCrispDecisionFunction::univariateCrispDecisionFunction | ( | const int & | dim, | |
const double & | thresh | |||
) |
Sets the condition of the decision function.
dim | dimension for the decision | |
thresh | the threshold |
lti::crispDecisionTree::univariateCrispDecisionFunction::univariateCrispDecisionFunction | ( | const univariateCrispDecisionFunction & | other | ) |
copy constructor
other | the univariateCrispDecisionFunction object to be copied |
lti::crispDecisionTree::univariateCrispDecisionFunction::~univariateCrispDecisionFunction | ( | ) |
destructor
virtual bool lti::crispDecisionTree::univariateCrispDecisionFunction::apply | ( | const dvector & | data | ) | const [virtual] |
Evaluate the condition implemented in the cdf.
data | value to be evaluated |
Implements lti::crispDecisionTree::crispDecisionFunction.
virtual crispDecisionFunction* lti::crispDecisionTree::univariateCrispDecisionFunction::clone | ( | ) | const [virtual] |
returns a pointer to a clone of the univariateCrispDecisionFunction
Implements lti::crispDecisionTree::crispDecisionFunction.
univariateCrispDecisionFunction& lti::crispDecisionTree::univariateCrispDecisionFunction::copy | ( | const univariateCrispDecisionFunction & | other | ) |
copy the contents of a univariateCrispDecisionFunction object
other | the univariateCrispDecisionFunction object to be copied |
Reimplemented from lti::crispDecisionTree::crispDecisionFunction.
const char* lti::crispDecisionTree::univariateCrispDecisionFunction::getTypeName | ( | ) | const [virtual] |
returns name of this type
Reimplemented from lti::crispDecisionTree::crispDecisionFunction.
univariateCrispDecisionFunction& lti::crispDecisionTree::univariateCrispDecisionFunction::operator= | ( | const univariateCrispDecisionFunction & | other | ) |
copy the contents of a univariateCrispDecisionFunction object
other | the univariateCrispDecisionFunction object to be copied |
Reimplemented from lti::crispDecisionTree::crispDecisionFunction.
virtual bool lti::crispDecisionTree::univariateCrispDecisionFunction::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
read the univariateCrispDecisionFunction from the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::crispDecisionTree::crispDecisionFunction.
void lti::crispDecisionTree::univariateCrispDecisionFunction::setCondition | ( | const int & | dim, | |
const double & | thresh | |||
) |
Sets the condition to be tested.
dim | the dimension to be tested. | |
thresh | the threshold in that dimension |
virtual bool lti::crispDecisionTree::univariateCrispDecisionFunction::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
write the univariateCrispDecisionFunction in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::crispDecisionTree::crispDecisionFunction.
The dimension to be tested.
double lti::crispDecisionTree::univariateCrispDecisionFunction::threshold [protected] |
Threshold against which the data is tested in the given dimension.