|
OpenCV 2.4.4 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opencv.ml.CvStatModel org.opencv.ml.CvDTree
public class CvDTree
The class implements a decision tree as described in the beginning of this section.
Constructor Summary | |
---|---|
CvDTree()
|
Method Summary | |
---|---|
void |
clear()
|
Mat |
getVarImportance()
Returns the variable importance array. |
boolean |
train(Mat trainData,
int tflag,
Mat responses)
Trains a decision tree. |
boolean |
train(Mat trainData,
int tflag,
Mat responses,
Mat varIdx,
Mat sampleIdx,
Mat varType,
Mat missingDataMask,
CvDTreeParams params)
Trains a decision tree. |
Methods inherited from class org.opencv.ml.CvStatModel |
---|
load, load, save, save |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CvDTree()
Method Detail |
---|
public void clear()
public Mat getVarImportance()
Returns the variable importance array.
public boolean train(Mat trainData, int tflag, Mat responses)
Trains a decision tree.
There are four train
methods in "CvDTree":
tflag=CV_ROW_SAMPLE
and tflag=CV_COL_SAMPLE
) are
supported, as well as sample and variable subsets, missing measurements,
arbitrary combinations of input and output variable types, and so on. The
last parameter contains all of the necessary training parameters (see the
"CvDTreeParams" description).
train
is mostly used for building tree
ensembles. It takes the pre-constructed "CvDTreeTrainData" instance and an
optional subset of the training set. The indices in subsampleIdx
are counted relatively to the _sample_idx
, passed to the
CvDTreeTrainData
constructor. For example, if _sample_idx=[1,
5, 7, 100]
, then subsampleIdx=[0,3]
means that the
samples [1, 100]
of the original training set are used.
The function is parallelized with the TBB library.
trainData
- a trainDatatflag
- a tflagresponses
- a responsespublic boolean train(Mat trainData, int tflag, Mat responses, Mat varIdx, Mat sampleIdx, Mat varType, Mat missingDataMask, CvDTreeParams params)
Trains a decision tree.
There are four train
methods in "CvDTree":
tflag=CV_ROW_SAMPLE
and tflag=CV_COL_SAMPLE
) are
supported, as well as sample and variable subsets, missing measurements,
arbitrary combinations of input and output variable types, and so on. The
last parameter contains all of the necessary training parameters (see the
"CvDTreeParams" description).
train
is mostly used for building tree
ensembles. It takes the pre-constructed "CvDTreeTrainData" instance and an
optional subset of the training set. The indices in subsampleIdx
are counted relatively to the _sample_idx
, passed to the
CvDTreeTrainData
constructor. For example, if _sample_idx=[1,
5, 7, 100]
, then subsampleIdx=[0,3]
means that the
samples [1, 100]
of the original training set are used.
The function is parallelized with the TBB library.
trainData
- a trainDatatflag
- a tflagresponses
- a responsesvarIdx
- a varIdxsampleIdx
- a sampleIdxvarType
- a varTypemissingDataMask
- a missingDataMaskparams
- a params
|
OpenCV 2.4.4 Documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |