Main Page | Namespace List | Class Hierarchy | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

CLUS::MultiDecisionTreeNode< T_Splitter > Class Template Reference

#include <multidecisiontreenode.h>

Collaboration diagram for CLUS::MultiDecisionTreeNode< T_Splitter >:

Collaboration graph
[legend]

Public Member Functions

 MultiDecisionTreeNode (MultiDecisionTreeNode< T_Splitter > *Parent, int NodeId, const Vector< int > &DDomainSize, int CsplitDim, int NoDatasets, DiscretePermutationTransformation &discreteTransformer, ContinuousLinearTransformation &continuousTransformer)
 ~MultiDecisionTreeNode (void)
void StartLearningEpoch (void)
void LearnSample (const int *Dvars, const double *Cvars, int classlabel, int datasetNo)
bool FindSplitAttributes (list< int > &attList)
 If the node is in splitting stage find the split attribute and if it has no shift add attribute to the attList.

double ComputeTotalWeight (void)
double computeSumOfVarianceInverted (int attribute, int dataSetIndex)
 sums 1/v_n, for the subtree with this as root, where v_n is the variance of the split point for attribute, as computed at node n

double combineSplits (int attribute, int dataSetIndex, double *sumInvVars)
 Combines shifts for attribute for subtree with this as root. Note: needs to be normalized.

double combineLabeledCenters (int attribute, int dataSetIndex, double *sumInvVars)
bool labeledMeansSignificant (int attribute, int dataSetIndex)
bool negMeanLessThanPos (int attribute, int dataSetIndex)
double combineCenters (int attribute, int dataSetIndex, double *sumInvVars)
void AddDiscreteShiftStatistics (int SplitAttribute, Vector< BinomialStatistics > &statistics)
void AddContinuousShiftStatistics (int SplitAttribute, Vector< NormalStatistics > &statistics)
bool StopLearningEpoch (int splitType, int min_no_datapoints)
 
Returns:
true if more learning has to be done in future


Permutation ComputeDiscreteShift (bool label, int attribute, int datasetIndex)
double Infer (const int *Dvars, const double *Cvars)
 Does the inference.

void InitializePruningStatistics (void)
void UpdatePruningStatistics (const int *Dvars, const double *Cvars, int classlabel, int datasetNo)
void FinalizePruningStatistics (void)
double PruneSubtree (void)
 Returns the optimal cost for this subtree and cuts the subtree to optimal size.

void SaveToStream (ostream &out)

Private Types

enum  state { stable, split }
 the state of the node. At creation em. At load stable More...


Private Member Functions

double ComputePruningCost (void)
double ComputeNodeWeight (void)

Private Attributes

int nodeId
 unique identifier of the cluster for a regression tree.

enum CLUS::MultiDecisionTreeNode::state State
 the state of the node. At creation em. At load stable

MultiDecisionTreeNode< T_Splitter > * Children [2]
 the children of this node

MultiDecisionTreeNode< T_Splitter > * parent
 the children of this node

int classLabel
 the predicted class labels for each of the trees

T_Splitter Splitter
 splitter for split criterion

Vector< int > pruningMistakes
 statistics for pruning.

Vector< int > pruningSamples
 number of samples in this node for pruning

template<class T_Splitter>
class CLUS::MultiDecisionTreeNode< T_Splitter >


Member Enumeration Documentation

template<class T_Splitter>
enum CLUS::MultiDecisionTreeNode::state [private]
 

the state of the node. At creation em. At load stable

Enumeration values:
stable 
split 

Definition at line 56 of file multidecisiontreenode.h.


Constructor & Destructor Documentation

template<class T_Splitter>
CLUS::MultiDecisionTreeNode< T_Splitter >::MultiDecisionTreeNode MultiDecisionTreeNode< T_Splitter > *  Parent,
int  NodeId,
const Vector< int > &  DDomainSize,
int  CsplitDim,
int  NoDatasets,
DiscretePermutationTransformation discreteTransformer,
ContinuousLinearTransformation continuousTransformer
[inline]
 

Definition at line 98 of file multidecisiontreenode.h.

template<class T_Splitter>
CLUS::MultiDecisionTreeNode< T_Splitter >::~MultiDecisionTreeNode void   )  [inline]
 

Definition at line 113 of file multidecisiontreenode.h.


Member Function Documentation

template<class T_Splitter>
void CLUS::MultiDecisionTreeNode< T_Splitter >::AddContinuousShiftStatistics int  SplitAttribute,
Vector< NormalStatistics > &  statistics
[inline]
 

Definition at line 341 of file multidecisiontreenode.h.

template<class T_Splitter>
void CLUS::MultiDecisionTreeNode< T_Splitter >::AddDiscreteShiftStatistics int  SplitAttribute,
Vector< BinomialStatistics > &  statistics
[inline]
 

Definition at line 330 of file multidecisiontreenode.h.

template<class T_Splitter>
double CLUS::MultiDecisionTreeNode< T_Splitter >::combineCenters int  attribute,
int  dataSetIndex,
double *  sumInvVars
[inline]
 

Definition at line 301 of file multidecisiontreenode.h.

template<class T_Splitter>
double CLUS::MultiDecisionTreeNode< T_Splitter >::combineLabeledCenters int  attribute,
int  dataSetIndex,
double *  sumInvVars
[inline]
 

Definition at line 262 of file multidecisiontreenode.h.

template<class T_Splitter>
double CLUS::MultiDecisionTreeNode< T_Splitter >::combineSplits int  attribute,
int  dataSetIndex,
double *  sumInvVars
[inline]
 

Combines shifts for attribute for subtree with this as root. Note: needs to be normalized.

Definition at line 235 of file multidecisiontreenode.h.

template<class T_Splitter>
Permutation CLUS::MultiDecisionTreeNode< T_Splitter >::ComputeDiscreteShift bool  label,
int  attribute,
int  datasetIndex
[inline]
 

Definition at line 398 of file multidecisiontreenode.h.

template<class T_Splitter>
double CLUS::MultiDecisionTreeNode< T_Splitter >::ComputeNodeWeight void   )  [inline, private]
 

Todo:
add more code to implement new weighing schemes

Definition at line 88 of file multidecisiontreenode.h.

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::AddContinuousShiftStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::AddDiscreteShiftStatistics(), and CLUS::MultiDecisionTreeNode< T_Splitter >::ComputeTotalWeight().

template<class T_Splitter>
double CLUS::MultiDecisionTreeNode< T_Splitter >::ComputePruningCost void   )  [inline, private]
 

Definition at line 74 of file multidecisiontreenode.h.

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::PruneSubtree().

template<class T_Splitter>
double CLUS::MultiDecisionTreeNode< T_Splitter >::computeSumOfVarianceInverted int  attribute,
int  dataSetIndex
[inline]
 

sums 1/v_n, for the subtree with this as root, where v_n is the variance of the split point for attribute, as computed at node n

Definition at line 217 of file multidecisiontreenode.h.

template<class T_Splitter>
double CLUS::MultiDecisionTreeNode< T_Splitter >::ComputeTotalWeight void   )  [inline]
 

Definition at line 206 of file multidecisiontreenode.h.

template<class T_Splitter>
void CLUS::MultiDecisionTreeNode< T_Splitter >::FinalizePruningStatistics void   )  [inline]
 

Definition at line 441 of file multidecisiontreenode.h.

template<class T_Splitter>
bool CLUS::MultiDecisionTreeNode< T_Splitter >::FindSplitAttributes list< int > &  attList  )  [inline]
 

If the node is in splitting stage find the split attribute and if it has no shift add attribute to the attList.

Returns:
false if we have a bogus split and we should make the parent a leaf

Definition at line 163 of file multidecisiontreenode.h.

template<class T_Splitter>
double CLUS::MultiDecisionTreeNode< T_Splitter >::Infer const int *  Dvars,
const double *  Cvars
[inline]
 

Does the inference.

Definition at line 406 of file multidecisiontreenode.h.

template<class T_Splitter>
void CLUS::MultiDecisionTreeNode< T_Splitter >::InitializePruningStatistics void   )  [inline]
 

Definition at line 420 of file multidecisiontreenode.h.

template<class T_Splitter>
bool CLUS::MultiDecisionTreeNode< T_Splitter >::labeledMeansSignificant int  attribute,
int  dataSetIndex
[inline]
 

Definition at line 291 of file multidecisiontreenode.h.

template<class T_Splitter>
void CLUS::MultiDecisionTreeNode< T_Splitter >::LearnSample const int *  Dvars,
const double *  Cvars,
int  classlabel,
int  datasetNo
[inline]
 

Definition at line 141 of file multidecisiontreenode.h.

template<class T_Splitter>
bool CLUS::MultiDecisionTreeNode< T_Splitter >::negMeanLessThanPos int  attribute,
int  dataSetIndex
[inline]
 

Definition at line 296 of file multidecisiontreenode.h.

template<class T_Splitter>
double CLUS::MultiDecisionTreeNode< T_Splitter >::PruneSubtree void   )  [inline]
 

Returns the optimal cost for this subtree and cuts the subtree to optimal size.

Definition at line 447 of file multidecisiontreenode.h.

template<class T_Splitter>
void CLUS::MultiDecisionTreeNode< T_Splitter >::SaveToStream ostream &  out  )  [inline]
 

Definition at line 478 of file multidecisiontreenode.h.

template<class T_Splitter>
void CLUS::MultiDecisionTreeNode< T_Splitter >::StartLearningEpoch void   )  [inline]
 

Definition at line 124 of file multidecisiontreenode.h.

template<class T_Splitter>
bool CLUS::MultiDecisionTreeNode< T_Splitter >::StopLearningEpoch int  splitType,
int  min_no_datapoints
[inline]
 

Returns:
true if more learning has to be done in future

Definition at line 353 of file multidecisiontreenode.h.

template<class T_Splitter>
void CLUS::MultiDecisionTreeNode< T_Splitter >::UpdatePruningStatistics const int *  Dvars,
const double *  Cvars,
int  classlabel,
int  datasetNo
[inline]
 

Definition at line 431 of file multidecisiontreenode.h.


Field Documentation

template<class T_Splitter>
MultiDecisionTreeNode< T_Splitter >* CLUS::MultiDecisionTreeNode< T_Splitter >::Children[2] [private]
 

the children of this node

Definition at line 59 of file multidecisiontreenode.h.

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::AddContinuousShiftStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::AddDiscreteShiftStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::combineCenters(), CLUS::MultiDecisionTreeNode< T_Splitter >::combineLabeledCenters(), CLUS::MultiDecisionTreeNode< T_Splitter >::combineSplits(), CLUS::MultiDecisionTreeNode< T_Splitter >::computeSumOfVarianceInverted(), CLUS::MultiDecisionTreeNode< T_Splitter >::ComputeTotalWeight(), CLUS::MultiDecisionTreeNode< T_Splitter >::FindSplitAttributes(), CLUS::MultiDecisionTreeNode< T_Splitter >::Infer(), CLUS::MultiDecisionTreeNode< T_Splitter >::InitializePruningStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::LearnSample(), CLUS::MultiDecisionTreeNode< T_Splitter >::MultiDecisionTreeNode(), CLUS::MultiDecisionTreeNode< T_Splitter >::PruneSubtree(), CLUS::MultiDecisionTreeNode< T_Splitter >::SaveToStream(), CLUS::MultiDecisionTreeNode< T_Splitter >::StartLearningEpoch(), CLUS::MultiDecisionTreeNode< T_Splitter >::StopLearningEpoch(), CLUS::MultiDecisionTreeNode< T_Splitter >::UpdatePruningStatistics(), and CLUS::MultiDecisionTreeNode< T_Splitter >::~MultiDecisionTreeNode().

template<class T_Splitter>
int CLUS::MultiDecisionTreeNode< T_Splitter >::classLabel [private]
 

the predicted class labels for each of the trees

Definition at line 62 of file multidecisiontreenode.h.

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::FindSplitAttributes(), CLUS::MultiDecisionTreeNode< T_Splitter >::Infer(), CLUS::MultiDecisionTreeNode< T_Splitter >::StopLearningEpoch(), and CLUS::MultiDecisionTreeNode< T_Splitter >::UpdatePruningStatistics().

template<class T_Splitter>
int CLUS::MultiDecisionTreeNode< T_Splitter >::nodeId [private]
 

unique identifier of the cluster for a regression tree.

Definition at line 53 of file multidecisiontreenode.h.

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::MultiDecisionTreeNode(), CLUS::MultiDecisionTreeNode< T_Splitter >::SaveToStream(), and CLUS::MultiDecisionTreeNode< T_Splitter >::StopLearningEpoch().

template<class T_Splitter>
MultiDecisionTreeNode< T_Splitter > * CLUS::MultiDecisionTreeNode< T_Splitter >::parent [private]
 

the children of this node

Definition at line 59 of file multidecisiontreenode.h.

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::MultiDecisionTreeNode().

template<class T_Splitter>
Vector<int> CLUS::MultiDecisionTreeNode< T_Splitter >::pruningMistakes [private]
 

statistics for pruning.

Individual statistics are maintained for each dataset sum of squared differences between prediction and true value

Definition at line 69 of file multidecisiontreenode.h.

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::ComputePruningCost(), CLUS::MultiDecisionTreeNode< T_Splitter >::InitializePruningStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::MultiDecisionTreeNode(), and CLUS::MultiDecisionTreeNode< T_Splitter >::UpdatePruningStatistics().

template<class T_Splitter>
Vector<int> CLUS::MultiDecisionTreeNode< T_Splitter >::pruningSamples [private]
 

number of samples in this node for pruning

Definition at line 72 of file multidecisiontreenode.h.

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::ComputePruningCost(), CLUS::MultiDecisionTreeNode< T_Splitter >::InitializePruningStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::MultiDecisionTreeNode(), and CLUS::MultiDecisionTreeNode< T_Splitter >::UpdatePruningStatistics().

template<class T_Splitter>
T_Splitter CLUS::MultiDecisionTreeNode< T_Splitter >::Splitter [private]
 

splitter for split criterion

Definition at line 65 of file multidecisiontreenode.h.

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::AddContinuousShiftStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::AddDiscreteShiftStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::combineCenters(), CLUS::MultiDecisionTreeNode< T_Splitter >::combineLabeledCenters(), CLUS::MultiDecisionTreeNode< T_Splitter >::combineSplits(), CLUS::MultiDecisionTreeNode< T_Splitter >::ComputeDiscreteShift(), CLUS::MultiDecisionTreeNode< T_Splitter >::computeSumOfVarianceInverted(), CLUS::MultiDecisionTreeNode< T_Splitter >::FindSplitAttributes(), CLUS::MultiDecisionTreeNode< T_Splitter >::Infer(), CLUS::MultiDecisionTreeNode< T_Splitter >::labeledMeansSignificant(), CLUS::MultiDecisionTreeNode< T_Splitter >::LearnSample(), CLUS::MultiDecisionTreeNode< T_Splitter >::MultiDecisionTreeNode(), CLUS::MultiDecisionTreeNode< T_Splitter >::negMeanLessThanPos(), CLUS::MultiDecisionTreeNode< T_Splitter >::SaveToStream(), CLUS::MultiDecisionTreeNode< T_Splitter >::StartLearningEpoch(), CLUS::MultiDecisionTreeNode< T_Splitter >::StopLearningEpoch(), and CLUS::MultiDecisionTreeNode< T_Splitter >::UpdatePruningStatistics().

template<class T_Splitter>
enum CLUS::MultiDecisionTreeNode::state CLUS::MultiDecisionTreeNode< T_Splitter >::State [private]
 

the state of the node. At creation em. At load stable

Referenced by CLUS::MultiDecisionTreeNode< T_Splitter >::AddContinuousShiftStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::AddDiscreteShiftStatistics(), CLUS::MultiDecisionTreeNode< T_Splitter >::combineCenters(), CLUS::MultiDecisionTreeNode< T_Splitter >::combineLabeledCenters(), CLUS::MultiDecisionTreeNode< T_Splitter >::combineSplits(), CLUS::MultiDecisionTreeNode< T_Splitter >::ComputeNodeWeight(), CLUS::MultiDecisionTreeNode< T_Splitter >::computeSumOfVarianceInverted(), CLUS::MultiDecisionTreeNode< T_Splitter >::ComputeTotalWeight(), CLUS::MultiDecisionTreeNode< T_Splitter >::FindSplitAttributes(), CLUS::MultiDecisionTreeNode< T_Splitter >::LearnSample(), CLUS::MultiDecisionTreeNode< T_Splitter >::MultiDecisionTreeNode(), CLUS::MultiDecisionTreeNode< T_Splitter >::StartLearningEpoch(), and CLUS::MultiDecisionTreeNode< T_Splitter >::StopLearningEpoch().


The documentation for this class was generated from the following file:
Generated on Mon Jul 21 16:57:51 2003 for SECRET by doxygen 1.3.2