11 #ifndef CONDITIONALPROBABILITYTREE_H__
12 #define CONDITIONALPROBABILITYTREE_H__
46 virtual const char*
get_name()
const {
return "ConditionalProbabilityTree"; }
float64_t accumulate_conditional_probability(bnode_t *leaf)
virtual ~CConditionalProbabilityTree()
The node of the tree structure forming a TreeMachine The node contains pointer to its parent and poin...
void train_example(SGVector< float32_t > ex, int32_t label)
void set_features(CStreamingDenseFeatures< float32_t > *feats)
virtual CMulticlassLabels * apply_multiclass(CFeatures *data=NULL)
virtual bool which_subtree(bnode_t *node, SGVector< float32_t > ex)=0
void set_num_passes(int32_t num_passes)
float64_t predict_node(SGVector< float32_t > ex, bnode_t *node)
Multiclass Labels for multi-class classification.
CConditionalProbabilityTree(int32_t num_passes=1)
CStreamingDenseFeatures< float32_t > * m_feats
online features
int32_t m_num_passes
number of passes for online training
int32_t get_num_passes() const
int32_t create_machine(SGVector< float32_t > ex)
std::map< int32_t, bnode_t * > m_leaves
class => leaf mapping
virtual bool train_machine(CFeatures *data)
virtual bool train_require_labels() const
void train_path(SGVector< float32_t > ex, bnode_t *node)
virtual const char * get_name() const
void train_node(SGVector< float32_t > ex, float64_t label, bnode_t *node)
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
class TreeMachine, a base class for tree based multiclass classifiers. This class is derived from CBa...
void compute_conditional_probabilities(SGVector< float32_t > ex)
virtual int32_t apply_multiclass_example(SGVector< float32_t > ex)