Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

# CvBoost Class Reference

`#include <ml.hpp>`

Inheritance diagram for CvBoost:

List of all members.

## Public Types
enum | { DISCRETE = 0, REAL = 1, LOGIT = 2, GENTLE = 3 }
enum | { DEFAULT = 0, GINI = 1, MISCLASS = 3, SQERR = 4 }
## Public Member Functions
virtual float | calc_error (CvMLData *_data, int type, std::vector< float > *resp=0)
virtual CV_WRAP void | clear ()
CV_WRAP | 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())
CV_WRAP | 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 const CvMat * | get_active_vars (bool absolute_idx=true)
const CvDTreeTrainData * | get_data () const
const CvBoostParams & | get_params () const
CvMat * | get_subtree_weights ()
CvSeq * | get_weak_predictors ()
CvMat * | get_weak_response ()
CvMat * | get_weights ()
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
virtual CV_WRAP 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 CV_WRAP void | prune (CvSlice slice)
virtual void | read (CvFileStorage *storage, CvFileNode *node)
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 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(), CvBoostParams params=CvBoostParams(), bool update=false)
virtual void | write (CvFileStorage *storage, const char *name) const
virtual | ~CvBoost ()
## Protected Member Functions
virtual void | read_params (CvFileStorage *fs, CvFileNode *node)
virtual bool | set_params (const CvBoostParams &params)
virtual void | trim_weights ()
virtual void | update_weights (CvBoostTree *tree)
virtual void | write_params (CvFileStorage *fs) const
## Protected Attributes
CvMat * | active_vars
CvMat * | active_vars_abs
CvDTreeTrainData * | data
bool | have_active_cat_vars
bool | have_subsample
CvMat * | orig_response
CvBoostParams | params
CvMat * | subsample_mask
CvMat * | subtree_weights
CvMat * | sum_response
CvSeq * | weak
CvMat * | weak_eval
CvMat * | weights

## Member Enumeration Documentation

anonymous enum

Enumerator:

  DISCRETE |
  REAL |
  LOGIT |
  GENTLE |

anonymous enum

Enumerator:

  DEFAULT |
  GINI |
  MISCLASS |
  SQERR |

## Constructor & Destructor Documentation

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

CV_WRAP 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 CV_WRAP 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 CV_WRAP 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 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 CV_WRAP 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
| ) |  | `[protected, virtual]`

virtual bool CvBoost::set_params | ( | const CvBoostParams & | params ) | `[protected, virtual]`

virtual CV_WRAP 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 bool CvBoost::train | ( | CvMLData * | data,
|  | CvBoostParams | params = `CvBoostParams()`,
|  | bool | update = `false`
| ) |  | `[virtual]`

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 void CvBoost::trim_weights | ( | ) | `[protected, virtual]`

virtual void CvBoost::update_weights | ( | CvBoostTree * | tree ) | `[protected, virtual]`

virtual void CvBoost::write | ( | CvFileStorage * | storage,
|  | const char * | name
| ) |  | const`[virtual]`

Reimplemented from CvStatModel.

virtual void CvBoost::write_params | ( | CvFileStorage * | fs ) | const`[protected, virtual]`

## 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:

- C:/opt/OpenCV-2.2.0/modules/ml/include/opencv2/ml/ml.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines