LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::manualCrispDecisionTree Class Reference

This class serves the manual construction of a crisp decision tree with crispNodes that have univariate decision functions. More...

#include <ltiManualCrispDecisionTree.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class manualCrispDecisionTree More...

Public Member Functions

 manualCrispDecisionTree ()
 manualCrispDecisionTree (const manualCrispDecisionTree &other)
virtual ~manualCrispDecisionTree ()
virtual const char * getTypeName () const
manualCrispDecisionTreecopy (const manualCrispDecisionTree &other)
manualCrispDecisionTreeoperator= (const manualCrispDecisionTree &other)
virtual classifierclone () const
const parametersgetParameters () const
virtual bool train (const dmatrix &input, const ivector &ids)

Detailed Description

This class serves the manual construction of a crisp decision tree with crispNodes that have univariate decision functions.

Instead of training data, the train method is given the nodes' conditions and ids in pre-order. Only one element of each row vector can be unequal to zero. This dimension and the value are taken for the dimension and threshold of the condition. Thus, only univariate decisions can be used. The following example shows the data and id values of the train method and the corresponding tree:

   *        +-     -+         +-  -+
   *        | 0 0 2 |         | -1 |
   *        | 1 0 0 |         | -1 |
   *        | 0 2 0 |         | -1 |
   *        | 0 1 0 |         | -1 |
   *        | 0 0 0 |         |  2 |
   * data = | 0 0 1 |   ids = | -1 |
   *        | 0 0 0 |         |  5 |
   *        | 0 0 0 |         |  0 |
   *        | 0 0 0 |         |  1 |
   *        | 0 0 0 |         |  3 |
   *        | 0 0 0 |         |  4 |
   *        +-     -+         +-  -+
   * 
manualCrispDecisionTree.png

The outputTemplate object of the tree will be initialized with the ids given in the ids vector. If other or multiple ids are desired, the outputTemplate object must be set manually.


Constructor & Destructor Documentation

lti::manualCrispDecisionTree::manualCrispDecisionTree (  ) 

default constructor

lti::manualCrispDecisionTree::manualCrispDecisionTree ( const manualCrispDecisionTree other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::manualCrispDecisionTree::~manualCrispDecisionTree (  )  [virtual]

destructor


Member Function Documentation

virtual classifier* lti::manualCrispDecisionTree::clone (  )  const [virtual]

returns a pointer to a clone of this classifier.

Implements lti::classifier.

manualCrispDecisionTree& lti::manualCrispDecisionTree::copy ( const manualCrispDecisionTree other  ) 

copy data of "other" classifier.

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

Reimplemented from lti::crispDecisionTree.

const parameters& lti::manualCrispDecisionTree::getParameters (  )  const

returns used parameters

Reimplemented from lti::crispDecisionTree.

virtual const char* lti::manualCrispDecisionTree::getTypeName (  )  const [virtual]

returns the name of this type ("manualCrispDecisionTree")

Reimplemented from lti::crispDecisionTree.

manualCrispDecisionTree& lti::manualCrispDecisionTree::operator= ( const manualCrispDecisionTree other  ) 

alias for copy member

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

Reimplemented from lti::crispDecisionTree.

virtual bool lti::manualCrispDecisionTree::train ( const dmatrix input,
const ivector ids 
) [virtual]

See description of this class.

Parameters:
input the conditions of the nodes
ids the ids of the nodes.
Returns:
true if successful, false otherwise. (if false you can check the error message with getStatusString())

Implements lti::supervisedInstanceClassifier.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:26:54 2010 for LTI-Lib by Doxygen 1.6.1