#include <regressiontreenode.h>
Collaboration diagram for CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >:

Public Member Functions | |
| BinaryRegressionTreeNode (int NodeId, int CsDim, T_Regressor ®ressor, T_Distribution *ParentDistribution=0) | |
| Constructor for a leaf. | |
| BinaryRegressionTreeNode (int NodeId, const Vector< int > &DDomainSize, int CsplitDim, int RegDim, T_Regressor ®ressor, T_Distribution *ParentDistribution=0) | |
| Constructor for an intermediate node. | |
| ~BinaryRegressionTreeNode (void) | |
| int | GetNodeId (void) |
| void | ComputeSizesTree (int &nodes, int &term_nodes) |
| void | StartLearningEpoch (void) |
| void | LearnSample (const int *Dvars, const double *Cvars, double probability, double threshold=.01) |
| bool | StopLearningEpoch (int splitType, int emRestarts, int emMaxIterations, double convergenceLim, int min_no_datapoints) |
| Returns true if more learning has to be donne in future. | |
| double | Infer (const int *Dvars, const double *Cvars, int maxNodeId, double threshold) |
| Does the inference. | |
| void | InitializePruningStatistics (void) |
| void | UpdatePruningStatistics (const int *Dvars, const double *Cvars, double y, double probability, double threshold) |
| void | FinalizePruningStatistics (void) |
| double | PruneSubtree (void) |
| Returns the optimal cost for this subtree and cuts the subtree to optimal size. | |
| void | SaveToStream (ostream &out) |
Protected Types | |
| enum | state { stable, em, split, regression } |
| the state of the node. At creation em. At load stable More... | |
Protected Member Functions | |
| void | RandomDistributions (void) |
| double | EMStep (double &Likelihood) |
| Peform an EM step on the data in buff and return the convergence factor and compute the likelihood. | |
Protected Attributes | |
| int | nodeId |
| unique identifier of the cluster for a regression tree. | |
| int | emTrials |
| how many times EM was attempted | |
| int | csDim |
| the number of continuous split variables | |
| int | regDim |
| the number of regressors | |
| enum CLUS::BinaryRegressionTreeNode::state | State |
| the state of the node. At creation em. At load stable | |
| BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter > * | Children [2] |
| the children of this node | |
| T_Splitter | Splitter |
| splitter for split criterion | |
| T_Regressor | Regressor |
| regressor for the node | |
| T_Distribution * | Distributions [2] |
| distributions for the children for the learning process | |
| T_Distribution * | parentDistribution |
| the distribution of the parent. Usefull in the learning process to pick initial values for the new distributions | |
| DynamicBuffer * | buffer |
| keep the EM samples here temporarily | |
| double | pruningCost |
| sum of squared differences between prediction and true value | |
| int | pruningSamples |
| number of samples in this node for pruning | |
Every class is a node in the tree, there can be 0 or 2 children NodeId determines the position of the node in the tree. The nodeId od children is alwais 2*nodeId and 2*nodeId+1. The nodeId starts from 1 for the root.
T_Distribution is the distribution that approximates the data T_Regressor is the regressor that commes with T_Distribution T_Spliter is the class that in a final scan can compute the splitting predicate
Definition at line 60 of file regressiontreenode.h.
|
|||||
|
the state of the node. At creation em. At load stable
Definition at line 77 of file regressiontreenode.h. |
|
||||||||||||||||||||||||
|
Constructor for a leaf.
Definition at line 149 of file regressiontreenode.h. |
|
||||||||||||||||||||||||||||||||
|
Constructor for an intermediate node.
Definition at line 160 of file regressiontreenode.h. |
|
||||||||||
|
Definition at line 178 of file regressiontreenode.h. |
|
||||||||||||||||
|
Definition at line 200 of file regressiontreenode.h. |
|
||||||||||
|
Peform an EM step on the data in buff and return the convergence factor and compute the likelihood.
Definition at line 122 of file regressiontreenode.h. Referenced by CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::StopLearningEpoch(). |
|
||||||||||
|
Definition at line 560 of file regressiontreenode.h. |
|
||||||||||
|
Definition at line 195 of file regressiontreenode.h. |
|
||||||||||||||||||||||||
|
Does the inference.
Definition at line 504 of file regressiontreenode.h. |
|
||||||||||
|
Definition at line 521 of file regressiontreenode.h. |
|
||||||||||||||||||||||||
|
Definition at line 239 of file regressiontreenode.h. |
|
||||||||||
|
Returns the optimal cost for this subtree and cuts the subtree to optimal size.
Definition at line 566 of file regressiontreenode.h. |
|
||||||||||
|
||||||||||
|
Definition at line 597 of file regressiontreenode.h. |
|
||||||||||
|
Definition at line 214 of file regressiontreenode.h. |
|
||||||||||||||||||||||||||||
|
Returns true if more learning has to be donne in future.
Definition at line 309 of file regressiontreenode.h. |
|
||||||||||||||||||||||||||||
|
Definition at line 533 of file regressiontreenode.h. |
|
|||||
|
|||||
|
|||||
|
|||||
|
|||||
|
how many times EM was attempted
Definition at line 68 of file regressiontreenode.h. Referenced by CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::BinaryRegressionTreeNode(), and CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::StopLearningEpoch(). |
|
|||||
|
unique identifier of the cluster for a regression tree. the id of the children is always 2*Id, 2*Id+1 Definition at line 65 of file regressiontreenode.h. Referenced by CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::BinaryRegressionTreeNode(), CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::GetNodeId(), CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::Infer(), CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::SaveToStream(), and CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::StopLearningEpoch(). |
|
|||||
|
the distribution of the parent. Usefull in the learning process to pick initial values for the new distributions
Definition at line 92 of file regressiontreenode.h. Referenced by CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::BinaryRegressionTreeNode(), CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::LearnSample(), and CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::StopLearningEpoch(). |
|
|||||
|
sum of squared differences between prediction and true value
Definition at line 98 of file regressiontreenode.h. Referenced by CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::InitializePruningStatistics(), CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::PruneSubtree(), and CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::UpdatePruningStatistics(). |
|
|||||
|
number of samples in this node for pruning
Definition at line 101 of file regressiontreenode.h. Referenced by CLUS::BinaryRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::InitializePruningStatistics(). |
|
|||||
|
|||||
|
regressor for the node
Definition at line 86 of file regressiontreenode.h. |
|
|||||
|
|||||
1.3.2