OpenCV  2.4.13.2
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

anonymous enum
Enumerator
SQUARED_LOSS 
ABSOLUTE_LOSS 
HUBER_LOSS 
DEVIANCE_LOSS 

Constructor & Destructor Documentation

§ CvGBTrees() [1/3]

CvGBTrees::CvGBTrees ( )

§ CvGBTrees() [2/3]

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() 
)

§ ~CvGBTrees()

virtual CvGBTrees::~CvGBTrees ( )
virtual

§ CvGBTrees() [3/3]

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

§ calc_error()

virtual float CvGBTrees::calc_error ( CvMLData _data,
int  type,
std::vector< float > *  resp = 0 
)
virtual

§ change_values()

virtual void CvGBTrees::change_values ( CvDTree tree,
const int  k = 0 
)
protectedvirtual

§ clear()

virtual void CvGBTrees::clear ( )
virtual

Reimplemented from CvStatModel.

§ do_subsample()

virtual void CvGBTrees::do_subsample ( )
protectedvirtual

§ find_gradient()

virtual void CvGBTrees::find_gradient ( const int  k = 0)
protectedvirtual

§ find_optimal_value()

virtual float CvGBTrees::find_optimal_value ( const CvMat _Idx)
protectedvirtual

§ get_len()

int CvGBTrees::get_len ( const CvMat mat) const
protected

§ GetLeaves()

CvDTreeNode** CvGBTrees::GetLeaves ( const CvDTree dtree,
int len 
)
protected

§ leaves_get()

void CvGBTrees::leaves_get ( CvDTreeNode **  leaves,
int count,
CvDTreeNode node 
)
protected

§ predict() [1/2]

virtual float CvGBTrees::predict ( const CvMat sample,
const CvMat missing = 0,
CvMat weakResponses = 0,
CvSlice  slice = CV_WHOLE_SEQ,
int  k = -1 
) const
virtual

§ predict() [2/2]

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

§ predict_serial()

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

§ problem_type()

virtual bool CvGBTrees::problem_type ( ) const
protectedvirtual

§ read()

virtual void CvGBTrees::read ( CvFileStorage fs,
CvFileNode node 
)
virtual

Reimplemented from CvStatModel.

§ read_params()

virtual void CvGBTrees::read_params ( CvFileStorage fs,
CvFileNode fnode 
)
protectedvirtual

§ train() [1/3]

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

§ train() [2/3]

virtual bool CvGBTrees::train ( CvMLData data,
CvGBTreesParams  params = CvGBTreesParams(),
bool  update = false 
)
virtual

§ train() [3/3]

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

§ write()

virtual void CvGBTrees::write ( CvFileStorage fs,
const char *  name 
) const
virtual

Reimplemented from CvStatModel.

§ write_params()

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

Member Data Documentation

§ base_value

float CvGBTrees::base_value
protected

§ class_count

int CvGBTrees::class_count
protected

§ class_labels

CvMat* CvGBTrees::class_labels
protected

§ data

CvDTreeTrainData* CvGBTrees::data
protected

§ delta

float CvGBTrees::delta
protected

§ missing

CvMat* CvGBTrees::missing
protected

§ orig_response

CvMat* CvGBTrees::orig_response
protected

§ params

CvGBTreesParams CvGBTrees::params
protected

§ rng

cv::RNG* CvGBTrees::rng
protected

§ sample_idx

CvMat* CvGBTrees::sample_idx
protected

§ subsample_test

CvMat* CvGBTrees::subsample_test
protected

§ subsample_train

CvMat* CvGBTrees::subsample_train
protected

§ sum_response

CvMat* CvGBTrees::sum_response
protected

§ sum_response_tmp

CvMat* CvGBTrees::sum_response_tmp
protected

§ weak

CvSeq** CvGBTrees::weak
protected

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