Public Member Functions | Protected Member Functions | Protected Attributes

# CvRTrees Class Reference

`#include <ml.hpp>`

Inheritance diagram for CvRTrees:

List of all members.

## Public Member Functions
virtual float | calc_error (CvMLData *_data, int type, std::vector< float > *resp=0)
virtual CV_WRAP void | clear ()
CV_WRAP | CvRTrees ()
CvMat * | get_active_var_mask ()
virtual float | get_proximity (const CvMat *sample1, const CvMat *sample2, const CvMat *missing1=0, const CvMat *missing2=0) const
CvRNG * | get_rng ()
virtual float | get_train_error ()
CvForestTree * | get_tree (int i) const
int | get_tree_count () const
virtual const CvMat * | get_var_importance ()
virtual CV_WRAP cv::Mat | getVarImportance ()
virtual CV_WRAP float | predict (const cv::Mat &sample, const cv::Mat &missing=cv::Mat()) const
virtual float | predict (const CvMat *sample, const CvMat *missing=0) const
virtual CV_WRAP float | predict_prob (const cv::Mat &sample, const cv::Mat &missing=cv::Mat()) const
virtual float | predict_prob (const CvMat *sample, const CvMat *missing=0) const
virtual void | read (CvFileStorage *fs, CvFileNode *node)
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(), CvRTParams params=CvRTParams())
virtual bool | train (CvMLData *data, CvRTParams params=CvRTParams())
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, CvRTParams params=CvRTParams())
virtual void | write (CvFileStorage *fs, const char *name) const
virtual | ~CvRTrees ()
## Protected Member Functions
virtual bool | grow_forest (const CvTermCriteria term_crit)
## Protected Attributes
CvMat * | active_var_mask
CvDTreeTrainData * | data
int | nclasses
int | nsamples
int | ntrees
double | oob_error
cv::RNG * | rng
CvForestTree ** | trees
CvMat * | var_importance

## Constructor & Destructor Documentation

CV_WRAP CvRTrees::CvRTrees | ( | ) |

virtual CvRTrees::~CvRTrees | ( | ) | `[virtual]`

## Member Function Documentation

virtual float CvRTrees::calc_error | ( | CvMLData * | _data,
|  | int | type,
|  | std::vector< float > * | resp = `0`
| ) |  | `[virtual]`

virtual CV_WRAP void CvRTrees::clear | ( | ) | `[virtual]`

Reimplemented from CvStatModel.

CvMat* CvRTrees::get_active_var_mask | ( | ) |

virtual float CvRTrees::get_proximity | ( | const CvMat * | sample1,
|  | const CvMat * | sample2,
|  | const CvMat * | missing1 = `0`,
|  | const CvMat * | missing2 = `0`
| ) |  | const`[virtual]`

CvRNG* CvRTrees::get_rng | ( | ) |

virtual float CvRTrees::get_train_error | ( | ) | `[virtual]`

CvForestTree* CvRTrees::get_tree | ( | int | i ) | const

int CvRTrees::get_tree_count | ( | ) | const

virtual const CvMat* CvRTrees::get_var_importance | ( | ) | `[virtual]`

virtual CV_WRAP cv::Mat CvRTrees::getVarImportance | ( | ) | `[virtual]`

virtual bool CvRTrees::grow_forest | ( | const CvTermCriteria | term_crit ) | `[protected, virtual]`

Reimplemented in CvERTrees.

virtual float CvRTrees::predict | ( | const CvMat * | sample,
|  | const CvMat * | missing = `0`
| ) |  | const`[virtual]`

virtual CV_WRAP float CvRTrees::predict | ( | const cv::Mat & | sample,
|  | const cv::Mat & | missing = `cv::Mat()`
| ) |  | const`[virtual]`

virtual float CvRTrees::predict_prob | ( | const CvMat * | sample,
|  | const CvMat * | missing = `0`
| ) |  | const`[virtual]`

virtual CV_WRAP float CvRTrees::predict_prob | ( | const cv::Mat & | sample,
|  | const cv::Mat & | missing = `cv::Mat()`
| ) |  | const`[virtual]`

virtual void CvRTrees::read | ( | CvFileStorage * | fs,
|  | CvFileNode * | node
| ) |  | `[virtual]`

Reimplemented from CvStatModel.

virtual bool CvRTrees::train | ( | CvMLData * | data,
|  | CvRTParams | params = `CvRTParams()`
| ) |  | `[virtual]`

Reimplemented in CvERTrees.

virtual CV_WRAP bool CvRTrees::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()`,
|  | CvRTParams | params = `CvRTParams()`
| ) |  | `[virtual]`

Reimplemented in CvERTrees.

virtual bool CvRTrees::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`,
|  | CvRTParams | params = `CvRTParams()`
| ) |  | `[virtual]`

Reimplemented in CvERTrees.

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

Reimplemented from CvStatModel.

## Member Data Documentation

CvMat* CvRTrees::active_var_mask`[protected]`

CvDTreeTrainData* CvRTrees::data`[protected]`

int CvRTrees::nclasses`[protected]`

int CvRTrees::nsamples`[protected]`

int CvRTrees::ntrees`[protected]`

double CvRTrees::oob_error`[protected]`

cv::RNG* CvRTrees::rng`[protected]`

CvForestTree** CvRTrees::trees`[protected]`

CvMat* CvRTrees::var_importance`[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