public class RTrees extends DTrees
PREDICT_AUTO, PREDICT_MASK, PREDICT_MAX_VOTE, PREDICT_SUM
COMPRESSED_INPUT, PREPROCESSED_INPUT, RAW_OUTPUT, UPDATE_MODEL
Modifier | Constructor and Description |
---|---|
protected |
RTrees(long addr) |
Modifier and Type | Method and Description |
---|---|
static RTrees |
__fromPtr__(long addr) |
static RTrees |
create()
Creates the empty model.
|
protected void |
finalize() |
int |
getActiveVarCount()
SEE: setActiveVarCount
|
boolean |
getCalculateVarImportance()
SEE: setCalculateVarImportance
|
TermCriteria |
getTermCriteria()
SEE: setTermCriteria
|
Mat |
getVarImportance()
Returns the variable importance array.
|
void |
getVotes(Mat samples,
Mat results,
int flags)
Returns the result of each individual tree in the forest.
|
static RTrees |
load(String filepath)
Loads and creates a serialized RTree from a file
Use RTree::save to serialize and store an RTree to disk.
|
static RTrees |
load(String filepath,
String nodeName)
Loads and creates a serialized RTree from a file
Use RTree::save to serialize and store an RTree to disk.
|
void |
setActiveVarCount(int val)
getActiveVarCount SEE: getActiveVarCount
|
void |
setCalculateVarImportance(boolean val)
getCalculateVarImportance SEE: getCalculateVarImportance
|
void |
setTermCriteria(TermCriteria val)
getTermCriteria SEE: getTermCriteria
|
getCVFolds, getMaxCategories, getMaxDepth, getMinSampleCount, getPriors, getRegressionAccuracy, getTruncatePrunedTree, getUse1SERule, getUseSurrogates, setCVFolds, setMaxCategories, setMaxDepth, setMinSampleCount, setPriors, setRegressionAccuracy, setTruncatePrunedTree, setUse1SERule, setUseSurrogates
calcError, empty, getVarCount, isClassifier, isTrained, predict, predict, predict, train, train, train
clear, getDefaultName, getNativeObjAddr, save
public static RTrees __fromPtr__(long addr)
public Mat getVarImportance()
public static RTrees create()
public static RTrees load(String filepath, String nodeName)
filepath
- path to serialized RTreenodeName
- name of node containing the classifierpublic static RTrees load(String filepath)
filepath
- path to serialized RTreepublic TermCriteria getTermCriteria()
public boolean getCalculateVarImportance()
public int getActiveVarCount()
public void getVotes(Mat samples, Mat results, int flags)
samples
- Array containing the samples for which votes will be calculated.results
- Array where the result of the calculation will be written.flags
- Flags for defining the type of RTrees.public void setActiveVarCount(int val)
val
- automatically generatedpublic void setCalculateVarImportance(boolean val)
val
- automatically generatedpublic void setTermCriteria(TermCriteria val)
val
- automatically generatedCopyright © 2020. All rights reserved.