#include <probabilisticregressiontreenode.h>
Collaboration diagram for CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >:
Public Member Functions | |
BinaryProbabilisticRegressionTreeNode (int NodeId, int CsDim, T_Regressor ®ressor, T_Distribution *ParentDistribution=0) | |
Constructor for a leaf. | |
BinaryProbabilisticRegressionTreeNode (int NodeId, const Vector< int > &DDomainSize, int CsplitDim, int RegDim, T_Regressor ®ressor, T_Distribution *ParentDistribution=0) | |
Constructor for an intermediate node. | |
~BinaryProbabilisticRegressionTreeNode (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) |
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) |
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) |
Perform 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::BinaryProbabilisticRegressionTreeNode::state | State |
the state of the node. At creation em. At load stable | |
BinaryProbabilisticRegressionTreeNode< 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 probabilisticregressiontreenode.h.
|
the state of the node. At creation em. At load stable
Definition at line 77 of file probabilisticregressiontreenode.h. |
|
Constructor for a leaf.
Definition at line 146 of file probabilisticregressiontreenode.h. |
|
Constructor for an intermediate node.
Definition at line 157 of file probabilisticregressiontreenode.h. |
|
Definition at line 175 of file probabilisticregressiontreenode.h. |
|
Definition at line 197 of file probabilisticregressiontreenode.h. |
|
Perform an EM step on the data in buff and return the convergence factor and compute the likelihood.
Definition at line 122 of file probabilisticregressiontreenode.h. Referenced by CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::StopLearningEpoch(). |
|
Definition at line 525 of file probabilisticregressiontreenode.h. |
|
Definition at line 192 of file probabilisticregressiontreenode.h. |
|
Does the inference.
Definition at line 482 of file probabilisticregressiontreenode.h. |
|
Definition at line 499 of file probabilisticregressiontreenode.h. |
|
Definition at line 236 of file probabilisticregressiontreenode.h. |
|
Returns the optimal cost for this subtree and cuts the subtree to optimal size.
Definition at line 531 of file probabilisticregressiontreenode.h. |
|
|
Definition at line 565 of file probabilisticregressiontreenode.h. |
|
Definition at line 211 of file probabilisticregressiontreenode.h. |
|
Returns true if more learning has to be donne in future.
Definition at line 293 of file probabilisticregressiontreenode.h. |
|
Definition at line 510 of file probabilisticregressiontreenode.h. |
|
|
|
|
|
how many times EM was attempted
Definition at line 68 of file probabilisticregressiontreenode.h. Referenced by CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::BinaryProbabilisticRegressionTreeNode(), and CLUS::BinaryProbabilisticRegressionTreeNode< 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 probabilisticregressiontreenode.h. Referenced by CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::BinaryProbabilisticRegressionTreeNode(), CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::LearnSample(), and CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::StopLearningEpoch(). |
|
sum of squared differences between prediction and true value
Definition at line 98 of file probabilisticregressiontreenode.h. Referenced by CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::InitializePruningStatistics(), CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::PruneSubtree(), and CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::UpdatePruningStatistics(). |
|
number of samples in this node for pruning
Definition at line 101 of file probabilisticregressiontreenode.h. Referenced by CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::InitializePruningStatistics(), and CLUS::BinaryProbabilisticRegressionTreeNode< T_Distribution, T_Regressor, T_Splitter >::UpdatePruningStatistics(). |
|
|
regressor for the node
Definition at line 86 of file probabilisticregressiontreenode.h. |
|
|