OpenCV  2.4.13
Open Source Computer Vision
CvGBTrees Class Reference

#include <ml.hpp>

Inheritance diagram for CvGBTrees:
CvStatModel

Public Types

enum  { SQUARED_LOSS =0, ABSOLUTE_LOSS, HUBER_LOSS =3, DEVIANCE_LOSS }
 

Public Member Functions

 CvGBTrees ()
 
 CvGBTrees (const CvMat *trainData, int tflag, const CvMat *responses, const CvMat *varIdx=0, const CvMat *sampleIdx=0, const CvMat *varType=0, const CvMat *missingDataMask=0, CvGBTreesParams params=CvGBTreesParams())
 
virtual ~CvGBTrees ()
 
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, CvGBTreesParams params=CvGBTreesParams(), bool update=false)
 
virtual bool train (CvMLData *data, CvGBTreesParams params=CvGBTreesParams(), bool update=false)
 
virtual float predict_serial (const CvMat *sample, const CvMat *missing=0, CvMat *weakResponses=0, CvSlice slice=CV_WHOLE_SEQ, int k=-1) const
 
virtual float predict (const CvMat *sample, const CvMat *missing=0, CvMat *weakResponses=0, CvSlice slice=CV_WHOLE_SEQ, int k=-1) const
 
virtual void clear ()
 
virtual float calc_error (CvMLData *_data, int type, std::vector< float > *resp=0)
 
virtual void write (CvFileStorage *fs, const char *name) const
 
virtual void read (CvFileStorage *fs, CvFileNode *node)
 
 CvGBTrees (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(), CvGBTreesParams params=CvGBTreesParams())
 
virtual 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(), CvGBTreesParams params=CvGBTreesParams(), bool update=false)
 
virtual float predict (const cv::Mat &sample, const cv::Mat &missing=cv::Mat(), const cv::Range &slice=cv::Range::all(), int k=-1) const
 
- Public Member Functions inherited from CvStatModel
 CvStatModel ()
 
virtual ~CvStatModel ()
 
virtual void save (const char *filename, const char *name=0) const
 
virtual void load (const char *filename, const char *name=0)
 

Protected Member Functions

virtual void find_gradient (const int k=0)
 
virtual void change_values (CvDTree *tree, const int k=0)
 
virtual float find_optimal_value (const CvMat *_Idx)
 
virtual void do_subsample ()
 
void leaves_get (CvDTreeNode **leaves, int &count, CvDTreeNode *node)
 
CvDTreeNode ** GetLeaves (const CvDTree *dtree, int &len)
 
virtual bool problem_type () const
 
virtual void write_params (CvFileStorage *fs) const
 
virtual void read_params (CvFileStorage *fs, CvFileNode *fnode)
 
int get_len (const CvMat *mat) const
 

Protected Attributes

CvDTreeTrainDatadata
 
CvGBTreesParams params
 
CvSeq ** weak
 
CvMatorig_response
 
CvMatsum_response
 
CvMatsum_response_tmp
 
CvMatsample_idx
 
CvMatsubsample_train
 
CvMatsubsample_test
 
CvMatmissing
 
CvMatclass_labels
 
cv::RNGrng
 
int class_count
 
float delta
 
float base_value
 
- Protected Attributes inherited from CvStatModel
const char * default_model_name
 

Member Enumeration Documentation

anonymous enum
Enumerator
SQUARED_LOSS 
ABSOLUTE_LOSS 
HUBER_LOSS 
DEVIANCE_LOSS 

Constructor & Destructor Documentation

CvGBTrees::CvGBTrees ( )
CvGBTrees::CvGBTrees ( const CvMat trainData,
int  tflag,
const CvMat responses,
const CvMat varIdx = 0,
const CvMat sampleIdx = 0,
const CvMat varType = 0,
const CvMat missingDataMask = 0,
CvGBTreesParams  params = CvGBTreesParams() 
)
virtual CvGBTrees::~CvGBTrees ( )
virtual
CvGBTrees::CvGBTrees ( 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(),
CvGBTreesParams  params = CvGBTreesParams() 
)

Member Function Documentation

virtual float CvGBTrees::calc_error ( CvMLData _data,
int  type,
std::vector< float > *  resp = 0 
)
virtual
virtual void CvGBTrees::change_values ( CvDTree tree,
const int  k = 0 
)
protectedvirtual
virtual void CvGBTrees::clear ( )
virtual

Reimplemented from CvStatModel.

virtual void CvGBTrees::do_subsample ( )
protectedvirtual
virtual void CvGBTrees::find_gradient ( const int  k = 0)
protectedvirtual
virtual float CvGBTrees::find_optimal_value ( const CvMat _Idx)
protectedvirtual
int CvGBTrees::get_len ( const CvMat mat) const
protected
CvDTreeNode** CvGBTrees::GetLeaves ( const CvDTree dtree,
int len 
)
protected
void CvGBTrees::leaves_get ( CvDTreeNode **  leaves,
int count,
CvDTreeNode node 
)
protected
virtual float CvGBTrees::predict ( const CvMat sample,
const CvMat missing = 0,
CvMat weakResponses = 0,
CvSlice  slice = CV_WHOLE_SEQ,
int  k = -1 
) const
virtual
virtual float CvGBTrees::predict ( const cv::Mat sample,
const cv::Mat missing = cv::Mat(),
const cv::Range slice = cv::Range::all(),
int  k = -1 
) const
virtual
virtual float CvGBTrees::predict_serial ( const CvMat sample,
const CvMat missing = 0,
CvMat weakResponses = 0,
CvSlice  slice = CV_WHOLE_SEQ,
int  k = -1 
) const
virtual
virtual bool CvGBTrees::problem_type ( ) const
protectedvirtual
virtual void CvGBTrees::read ( CvFileStorage fs,
CvFileNode node 
)
virtual

Reimplemented from CvStatModel.

virtual void CvGBTrees::read_params ( CvFileStorage fs,
CvFileNode fnode 
)
protectedvirtual
virtual bool CvGBTrees::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,
CvGBTreesParams  params = CvGBTreesParams(),
bool  update = false 
)
virtual
virtual bool CvGBTrees::train ( CvMLData data,
CvGBTreesParams  params = CvGBTreesParams(),
bool  update = false 
)
virtual
virtual bool CvGBTrees::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(),
CvGBTreesParams  params = CvGBTreesParams(),
bool  update = false 
)
virtual
virtual void CvGBTrees::write ( CvFileStorage fs,
const char *  name 
) const
virtual

Reimplemented from CvStatModel.

virtual void CvGBTrees::write_params ( CvFileStorage fs) const
protectedvirtual

Member Data Documentation

float CvGBTrees::base_value
protected
int CvGBTrees::class_count
protected
CvMat* CvGBTrees::class_labels
protected
CvDTreeTrainData* CvGBTrees::data
protected
float CvGBTrees::delta
protected
CvMat* CvGBTrees::missing
protected
CvMat* CvGBTrees::orig_response
protected
CvGBTreesParams CvGBTrees::params
protected
cv::RNG* CvGBTrees::rng
protected
CvMat* CvGBTrees::sample_idx
protected
CvMat* CvGBTrees::subsample_test
protected
CvMat* CvGBTrees::subsample_train
protected
CvMat* CvGBTrees::sum_response
protected
CvMat* CvGBTrees::sum_response_tmp
protected
CvSeq** CvGBTrees::weak
protected

The documentation for this class was generated from the following file: