CvDTree Class Reference

#include <ml.hpp>

Inheritance diagram for CvDTree:
CvStatModel CvBoostTree CvForestTree CvForestERTree

List of all members.

Public Member Functions

virtual float calc_error (CvMLData *trainData, int type, std::vector< float > *resp=0)
virtual CV_WRAP void clear ()
CV_WRAP CvDTree ()
CvDTreeTrainDataget_data ()
int get_pruned_tree_idx () const
const CvDTreeNodeget_root () const
virtual const CvMatget_var_importance ()
virtual CV_WRAP cv::Mat getVarImportance ()
virtual CV_WRAP CvDTreeNodepredict (const cv::Mat &sample, const cv::Mat &missingDataMask=cv::Mat(), bool preprocessedInput=false) const
virtual CvDTreeNodepredict (const CvMat *sample, const CvMat *missingDataMask=0, bool preprocessedInput=false) const
virtual void read (CvFileStorage *fs, CvFileNode *node, CvDTreeTrainData *data)
virtual void read (CvFileStorage *fs, CvFileNode *node)
virtual CV_WRAP bool train (const cv::Mat &trainData, int tflag, const cv::Mat &responses, const cv::Mat &varIdx=cv::Mat(), const cv::Mat &sampleIdx=cv::Mat(), const cv::Mat &varType=cv::Mat(), const cv::Mat &missingDataMask=cv::Mat(), CvDTreeParams params=CvDTreeParams())
virtual bool train (CvDTreeTrainData *trainData, const CvMat *subsampleIdx)
virtual bool train (CvMLData *trainData, CvDTreeParams params=CvDTreeParams())
virtual bool train (const CvMat *trainData, int tflag, const CvMat *responses, const CvMat *varIdx=0, const CvMat *sampleIdx=0, const CvMat *varType=0, const CvMat *missingDataMask=0, CvDTreeParams params=CvDTreeParams())
virtual void write (CvFileStorage *fs) const
virtual void write (CvFileStorage *fs, const char *name) const
virtual ~CvDTree ()

Public Attributes

int pruned_tree_idx

Protected Member Functions

virtual double calc_node_dir (CvDTreeNode *node)
virtual void calc_node_value (CvDTreeNode *node)
virtual void cluster_categories (const int *vectors, int vector_count, int var_count, int *sums, int k, int *cluster_labels)
virtual void complete_node_dir (CvDTreeNode *node)
virtual int cut_tree (int T, int fold, double min_alpha)
virtual bool do_train (const CvMat *_subsample_idx)
virtual CvDTreeSplitfind_best_split (CvDTreeNode *n)
virtual CvDTreeSplitfind_split_cat_class (CvDTreeNode *n, int vi, float init_quality=0, CvDTreeSplit *_split=0, uchar *ext_buf=0)
virtual CvDTreeSplitfind_split_cat_reg (CvDTreeNode *n, int vi, float init_quality=0, CvDTreeSplit *_split=0, uchar *ext_buf=0)
virtual CvDTreeSplitfind_split_ord_class (CvDTreeNode *n, int vi, float init_quality=0, CvDTreeSplit *_split=0, uchar *ext_buf=0)
virtual CvDTreeSplitfind_split_ord_reg (CvDTreeNode *n, int vi, float init_quality=0, CvDTreeSplit *_split=0, uchar *ext_buf=0)
virtual CvDTreeSplitfind_surrogate_split_cat (CvDTreeNode *n, int vi, uchar *ext_buf=0)
virtual CvDTreeSplitfind_surrogate_split_ord (CvDTreeNode *n, int vi, uchar *ext_buf=0)
virtual void free_prune_data (bool cut_tree)
virtual void free_tree ()
virtual void prune_cv ()
virtual CvDTreeNoderead_node (CvFileStorage *fs, CvFileNode *node, CvDTreeNode *parent)
virtual CvDTreeSplitread_split (CvFileStorage *fs, CvFileNode *node)
virtual void read_tree_nodes (CvFileStorage *fs, CvFileNode *node)
virtual void split_node_data (CvDTreeNode *n)
virtual void try_split_node (CvDTreeNode *n)
virtual double update_tree_rnc (int T, int fold)
virtual void write_node (CvFileStorage *fs, CvDTreeNode *node) const
virtual void write_split (CvFileStorage *fs, CvDTreeSplit *split) const
virtual void write_tree_nodes (CvFileStorage *fs) const

Protected Attributes

CvDTreeTrainDatadata
CvDTreeNoderoot
CvMatvar_importance

Friends

struct cv::DTreeBestSplitFinder

Constructor & Destructor Documentation

CV_WRAP CvDTree::CvDTree (  ) 
virtual CvDTree::~CvDTree (  )  [virtual]

Member Function Documentation

virtual float CvDTree::calc_error ( CvMLData trainData,
int  type,
std::vector< float > *  resp = 0 
) [virtual]
virtual double CvDTree::calc_node_dir ( CvDTreeNode node  )  [protected, virtual]

Reimplemented in CvForestERTree, and CvBoostTree.

virtual void CvDTree::calc_node_value ( CvDTreeNode node  )  [protected, virtual]

Reimplemented in CvBoostTree.

virtual CV_WRAP void CvDTree::clear (  )  [virtual]

Reimplemented from CvStatModel.

Reimplemented in CvBoostTree.

virtual void CvDTree::cluster_categories ( const int *  vectors,
int  vector_count,
int  var_count,
int *  sums,
int  k,
int *  cluster_labels 
) [protected, virtual]
virtual void CvDTree::complete_node_dir ( CvDTreeNode node  )  [protected, virtual]
virtual int CvDTree::cut_tree ( int  T,
int  fold,
double  min_alpha 
) [protected, virtual]
virtual bool CvDTree::do_train ( const CvMat _subsample_idx  )  [protected, virtual]
virtual CvDTreeSplit* CvDTree::find_best_split ( CvDTreeNode n  )  [protected, virtual]

Reimplemented in CvForestTree.

virtual CvDTreeSplit* CvDTree::find_split_cat_class ( CvDTreeNode n,
int  vi,
float  init_quality = 0,
CvDTreeSplit _split = 0,
uchar ext_buf = 0 
) [protected, virtual]

Reimplemented in CvForestERTree, and CvBoostTree.

virtual CvDTreeSplit* CvDTree::find_split_cat_reg ( CvDTreeNode n,
int  vi,
float  init_quality = 0,
CvDTreeSplit _split = 0,
uchar ext_buf = 0 
) [protected, virtual]

Reimplemented in CvForestERTree, and CvBoostTree.

virtual CvDTreeSplit* CvDTree::find_split_ord_class ( CvDTreeNode n,
int  vi,
float  init_quality = 0,
CvDTreeSplit _split = 0,
uchar ext_buf = 0 
) [protected, virtual]

Reimplemented in CvForestERTree, and CvBoostTree.

virtual CvDTreeSplit* CvDTree::find_split_ord_reg ( CvDTreeNode n,
int  vi,
float  init_quality = 0,
CvDTreeSplit _split = 0,
uchar ext_buf = 0 
) [protected, virtual]

Reimplemented in CvForestERTree, and CvBoostTree.

virtual CvDTreeSplit* CvDTree::find_surrogate_split_cat ( CvDTreeNode n,
int  vi,
uchar ext_buf = 0 
) [protected, virtual]

Reimplemented in CvBoostTree.

virtual CvDTreeSplit* CvDTree::find_surrogate_split_ord ( CvDTreeNode n,
int  vi,
uchar ext_buf = 0 
) [protected, virtual]

Reimplemented in CvBoostTree.

virtual void CvDTree::free_prune_data ( bool  cut_tree  )  [protected, virtual]
virtual void CvDTree::free_tree (  )  [protected, virtual]
CvDTreeTrainData* CvDTree::get_data (  ) 
int CvDTree::get_pruned_tree_idx (  )  const
const CvDTreeNode* CvDTree::get_root (  )  const
virtual const CvMat* CvDTree::get_var_importance (  )  [virtual]
virtual CV_WRAP cv::Mat CvDTree::getVarImportance (  )  [virtual]
virtual CV_WRAP CvDTreeNode* CvDTree::predict ( const cv::Mat sample,
const cv::Mat missingDataMask = cv::Mat(),
bool  preprocessedInput = false 
) const [virtual]
virtual CvDTreeNode* CvDTree::predict ( const CvMat sample,
const CvMat missingDataMask = 0,
bool  preprocessedInput = false 
) const [virtual]
virtual void CvDTree::prune_cv (  )  [protected, virtual]
virtual void CvDTree::read ( CvFileStorage fs,
CvFileNode node,
CvDTreeTrainData data 
) [virtual]

Reimplemented in CvForestTree, and CvBoostTree.

virtual void CvDTree::read ( CvFileStorage fs,
CvFileNode node 
) [virtual]

Reimplemented from CvStatModel.

Reimplemented in CvForestTree, and CvBoostTree.

virtual CvDTreeNode* CvDTree::read_node ( CvFileStorage fs,
CvFileNode node,
CvDTreeNode parent 
) [protected, virtual]
virtual CvDTreeSplit* CvDTree::read_split ( CvFileStorage fs,
CvFileNode node 
) [protected, virtual]
virtual void CvDTree::read_tree_nodes ( CvFileStorage fs,
CvFileNode node 
) [protected, virtual]
virtual void CvDTree::split_node_data ( CvDTreeNode n  )  [protected, virtual]

Reimplemented in CvForestERTree.

virtual CV_WRAP bool CvDTree::train ( const cv::Mat trainData,
int  tflag,
const cv::Mat responses,
const cv::Mat varIdx = cv::Mat(),
const cv::Mat sampleIdx = cv::Mat(),
const cv::Mat varType = cv::Mat(),
const cv::Mat missingDataMask = cv::Mat(),
CvDTreeParams  params = CvDTreeParams() 
) [virtual]
virtual bool CvDTree::train ( CvDTreeTrainData trainData,
const CvMat subsampleIdx 
) [virtual]

Reimplemented in CvForestTree, and CvBoostTree.

virtual bool CvDTree::train ( CvMLData trainData,
CvDTreeParams  params = CvDTreeParams() 
) [virtual]
virtual bool CvDTree::train ( const CvMat trainData,
int  tflag,
const CvMat responses,
const CvMat varIdx = 0,
const CvMat sampleIdx = 0,
const CvMat varType = 0,
const CvMat missingDataMask = 0,
CvDTreeParams  params = CvDTreeParams() 
) [virtual]

Reimplemented in CvForestTree, and CvBoostTree.

virtual void CvDTree::try_split_node ( CvDTreeNode n  )  [protected, virtual]

Reimplemented in CvBoostTree.

virtual double CvDTree::update_tree_rnc ( int  T,
int  fold 
) [protected, virtual]
virtual void CvDTree::write ( CvFileStorage fs  )  const [virtual]
virtual void CvDTree::write ( CvFileStorage fs,
const char *  name 
) const [virtual]

Reimplemented from CvStatModel.

virtual void CvDTree::write_node ( CvFileStorage fs,
CvDTreeNode node 
) const [protected, virtual]
virtual void CvDTree::write_split ( CvFileStorage fs,
CvDTreeSplit split 
) const [protected, virtual]
virtual void CvDTree::write_tree_nodes ( CvFileStorage fs  )  const [protected, virtual]

Friends And Related Function Documentation

friend struct cv::DTreeBestSplitFinder [friend]

Member Data Documentation

CvDTreeNode* CvDTree::root [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Thu Dec 23 11:40:54 2010 for opencv by  doxygen 1.6.3