OpenCV  2.4.13.6
Open Source Computer Vision
CvBoost Class Reference

#include <ml.hpp>

Inheritance diagram for CvBoost:
CvStatModel

Public Types

enum  { DISCRETE =0, REAL =1, LOGIT =2, GENTLE =3 }
 
enum  { DEFAULT =0, GINI =1, MISCLASS =3, SQERR =4 }
 

Public Member Functions

 CvBoost ()
 
virtual ~CvBoost ()
 
 CvBoost (const CvMat *trainData, int tflag, const CvMat *responses, const CvMat *varIdx=0, const CvMat *sampleIdx=0, const CvMat *varType=0, const CvMat *missingDataMask=0, CvBoostParams params=CvBoostParams())
 
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, CvBoostParams params=CvBoostParams(), bool update=false)
 
virtual bool train (CvMLData *data, CvBoostParams params=CvBoostParams(), bool update=false)
 
virtual float predict (const CvMat *sample, const CvMat *missing=0, CvMat *weak_responses=0, CvSlice slice=CV_WHOLE_SEQ, bool raw_mode=false, bool return_sum=false) const
 
 CvBoost (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(), CvBoostParams params=CvBoostParams())
 
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(), CvBoostParams params=CvBoostParams(), bool update=false)
 
virtual float predict (const cv::Mat &sample, const cv::Mat &missing=cv::Mat(), const cv::Range &slice=cv::Range::all(), bool rawMode=false, bool returnSum=false) const
 
virtual float calc_error (CvMLData *_data, int type, std::vector< float > *resp=0)
 
virtual void prune (CvSlice slice)
 
virtual void clear ()
 
virtual void write (CvFileStorage *storage, const char *name) const
 
virtual void read (CvFileStorage *storage, CvFileNode *node)
 
virtual const CvMatget_active_vars (bool absolute_idx=true)
 
CvSeqget_weak_predictors ()
 
CvMatget_weights ()
 
CvMatget_subtree_weights ()
 
CvMatget_weak_response ()
 
const CvBoostParamsget_params () const
 
const CvDTreeTrainDataget_data () 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

void update_weights_impl (CvBoostTree *tree, double initial_weights[2])
 
virtual bool set_params (const CvBoostParams &params)
 
virtual void update_weights (CvBoostTree *tree)
 
virtual void trim_weights ()
 
virtual void write_params (CvFileStorage *fs) const
 
virtual void read_params (CvFileStorage *fs, CvFileNode *node)
 

Protected Attributes

CvDTreeTrainDatadata
 
CvBoostParams params
 
CvSeqweak
 
CvMatactive_vars
 
CvMatactive_vars_abs
 
bool have_active_cat_vars
 
CvMatorig_response
 
CvMatsum_response
 
CvMatweak_eval
 
CvMatsubsample_mask
 
CvMatweights
 
CvMatsubtree_weights
 
bool have_subsample
 
- Protected Attributes inherited from CvStatModel
const char * default_model_name
 

Member Enumeration Documentation

§ anonymous enum

anonymous enum
Enumerator
DISCRETE 
REAL 
LOGIT 
GENTLE 

§ anonymous enum

anonymous enum
Enumerator
DEFAULT 
GINI 
MISCLASS 
SQERR 

Constructor & Destructor Documentation

§ CvBoost() [1/3]

CvBoost::CvBoost ( )

§ ~CvBoost()

virtual CvBoost::~CvBoost ( )
virtual

§ CvBoost() [2/3]

CvBoost::CvBoost ( const CvMat trainData,
int  tflag,
const CvMat responses,
const CvMat varIdx = 0,
const CvMat sampleIdx = 0,
const CvMat varType = 0,
const CvMat missingDataMask = 0,
CvBoostParams  params = CvBoostParams() 
)

§ CvBoost() [3/3]

CvBoost::CvBoost ( 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(),
CvBoostParams  params = CvBoostParams() 
)

Member Function Documentation

§ calc_error()

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

§ clear()

virtual void CvBoost::clear ( )
virtual

Reimplemented from CvStatModel.

§ get_active_vars()

virtual const CvMat* CvBoost::get_active_vars ( bool  absolute_idx = true)
virtual

§ get_data()

const CvDTreeTrainData* CvBoost::get_data ( ) const

§ get_params()

const CvBoostParams& CvBoost::get_params ( ) const

§ get_subtree_weights()

CvMat* CvBoost::get_subtree_weights ( )

§ get_weak_predictors()

CvSeq* CvBoost::get_weak_predictors ( )

§ get_weak_response()

CvMat* CvBoost::get_weak_response ( )

§ get_weights()

CvMat* CvBoost::get_weights ( )

§ predict() [1/2]

virtual float CvBoost::predict ( const CvMat sample,
const CvMat missing = 0,
CvMat weak_responses = 0,
CvSlice  slice = CV_WHOLE_SEQ,
bool  raw_mode = false,
bool  return_sum = false 
) const
virtual

§ predict() [2/2]

virtual float CvBoost::predict ( const cv::Mat sample,
const cv::Mat missing = cv::Mat(),
const cv::Range slice = cv::Range::all(),
bool  rawMode = false,
bool  returnSum = false 
) const
virtual

§ prune()

virtual void CvBoost::prune ( CvSlice  slice)
virtual

§ read()

virtual void CvBoost::read ( CvFileStorage storage,
CvFileNode node 
)
virtual

Reimplemented from CvStatModel.

§ read_params()

virtual void CvBoost::read_params ( CvFileStorage fs,
CvFileNode node 
)
protectedvirtual

§ set_params()

virtual bool CvBoost::set_params ( const CvBoostParams params)
protectedvirtual

§ train() [1/3]

virtual bool CvBoost::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,
CvBoostParams  params = CvBoostParams(),
bool  update = false 
)
virtual

§ train() [2/3]

virtual bool CvBoost::train ( CvMLData data,
CvBoostParams  params = CvBoostParams(),
bool  update = false 
)
virtual

§ train() [3/3]

virtual bool CvBoost::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(),
CvBoostParams  params = CvBoostParams(),
bool  update = false 
)
virtual

§ trim_weights()

virtual void CvBoost::trim_weights ( )
protectedvirtual

§ update_weights()

virtual void CvBoost::update_weights ( CvBoostTree tree)
protectedvirtual

§ update_weights_impl()

void CvBoost::update_weights_impl ( CvBoostTree tree,
double  initial_weights[2] 
)
protected

§ write()

virtual void CvBoost::write ( CvFileStorage storage,
const char *  name 
) const
virtual

Reimplemented from CvStatModel.

§ write_params()

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

Member Data Documentation

§ active_vars

CvMat* CvBoost::active_vars
protected

§ active_vars_abs

CvMat* CvBoost::active_vars_abs
protected

§ data

CvDTreeTrainData* CvBoost::data
protected

§ have_active_cat_vars

bool CvBoost::have_active_cat_vars
protected

§ have_subsample

bool CvBoost::have_subsample
protected

§ orig_response

CvMat* CvBoost::orig_response
protected

§ params

CvBoostParams CvBoost::params
protected

§ subsample_mask

CvMat* CvBoost::subsample_mask
protected

§ subtree_weights

CvMat* CvBoost::subtree_weights
protected

§ sum_response

CvMat* CvBoost::sum_response
protected

§ weak

CvSeq* CvBoost::weak
protected

§ weak_eval

CvMat* CvBoost::weak_eval
protected

§ weights

CvMat* CvBoost::weights
protected

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