OpenCV  2.4.13
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
Enumerator
DISCRETE 
REAL 
LOGIT 
GENTLE 
anonymous enum
Enumerator
DEFAULT 
GINI 
MISCLASS 
SQERR 

Constructor & Destructor Documentation

CvBoost::CvBoost ( )
virtual CvBoost::~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() 
)
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

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

Reimplemented from CvStatModel.

virtual const CvMat* CvBoost::get_active_vars ( bool  absolute_idx = true)
virtual
const CvDTreeTrainData* CvBoost::get_data ( ) const
const CvBoostParams& CvBoost::get_params ( ) const
CvMat* CvBoost::get_subtree_weights ( )
CvSeq* CvBoost::get_weak_predictors ( )
CvMat* CvBoost::get_weak_response ( )
CvMat* CvBoost::get_weights ( )
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
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
virtual void CvBoost::prune ( CvSlice  slice)
virtual
virtual void CvBoost::read ( CvFileStorage storage,
CvFileNode node 
)
virtual

Reimplemented from CvStatModel.

virtual void CvBoost::read_params ( CvFileStorage fs,
CvFileNode node 
)
protectedvirtual
virtual bool CvBoost::set_params ( const CvBoostParams params)
protectedvirtual
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
virtual bool CvBoost::train ( CvMLData data,
CvBoostParams  params = CvBoostParams(),
bool  update = false 
)
virtual
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
virtual void CvBoost::trim_weights ( )
protectedvirtual
virtual void CvBoost::update_weights ( CvBoostTree tree)
protectedvirtual
void CvBoost::update_weights_impl ( CvBoostTree tree,
double  initial_weights[2] 
)
protected
virtual void CvBoost::write ( CvFileStorage storage,
const char *  name 
) const
virtual

Reimplemented from CvStatModel.

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

Member Data Documentation

CvMat* CvBoost::active_vars
protected
CvMat* CvBoost::active_vars_abs
protected
CvDTreeTrainData* CvBoost::data
protected
bool CvBoost::have_active_cat_vars
protected
bool CvBoost::have_subsample
protected
CvMat* CvBoost::orig_response
protected
CvBoostParams CvBoost::params
protected
CvMat* CvBoost::subsample_mask
protected
CvMat* CvBoost::subtree_weights
protected
CvMat* CvBoost::sum_response
protected
CvSeq* CvBoost::weak
protected
CvMat* CvBoost::weak_eval
protected
CvMat* CvBoost::weights
protected

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