OpenCV for Unity 2.6.5
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
The class represents a single decision tree or a collection of decision trees. More...
Public Member Functions | |
int | getCVFolds () |
int | getMaxCategories () |
int | getMaxDepth () |
int | getMinSampleCount () |
Mat | getPriors () |
float | getRegressionAccuracy () |
bool | getTruncatePrunedTree () |
bool | getUse1SERule () |
bool | getUseSurrogates () |
void | setCVFolds (int val) |
void | setMaxCategories (int val) |
void | setMaxDepth (int val) |
void | setMinSampleCount (int val) |
void | setPriors (Mat val) |
void | setRegressionAccuracy (float val) |
void | setTruncatePrunedTree (bool val) |
void | setUse1SERule (bool val) |
void | setUseSurrogates (bool val) |
Public Member Functions inherited from OpenCVForUnity.MlModule.StatModel | |
float | calcError (TrainData data, bool test, Mat resp) |
Computes error on the training or test dataset. | |
override bool | empty () |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. | |
int | getVarCount () |
Returns the number of variables in training samples. | |
bool | isClassifier () |
Returns true if the model is classifier. | |
bool | isTrained () |
Returns true if the model is trained. | |
virtual float | predict (Mat samples) |
Predicts response(s) for the provided sample(s) | |
virtual float | predict (Mat samples, Mat results) |
Predicts response(s) for the provided sample(s) | |
virtual float | predict (Mat samples, Mat results, int flags) |
Predicts response(s) for the provided sample(s) | |
bool | train (Mat samples, int layout, Mat responses) |
Trains the statistical model. | |
bool | train (TrainData trainData) |
Trains the statistical model. | |
bool | train (TrainData trainData, int flags) |
Trains the statistical model. | |
Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
virtual void | clear () |
Clears the algorithm state. | |
virtual string | getDefaultName () |
IntPtr | getNativeObjAddr () |
void | save (string filename) |
Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
void | Dispose () |
void | ThrowIfDisposed () |
Static Public Member Functions | |
static new DTrees | __fromPtr__ (IntPtr addr) |
static DTrees | create () |
Creates the empty model. | |
static DTrees | load (string filepath) |
Loads and creates a serialized DTrees from a file. | |
static DTrees | load (string filepath, string nodeName) |
Loads and creates a serialized DTrees from a file. | |
Static Public Member Functions inherited from OpenCVForUnity.MlModule.StatModel | |
static new StatModel | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
static Algorithm | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
Static Public Attributes | |
const int | PREDICT_AUTO = 0 |
const int | PREDICT_MASK = (3 << 8) |
const int | PREDICT_MAX_VOTE = (2 << 8) |
const int | PREDICT_SUM = (1 << 8) |
Static Public Attributes inherited from OpenCVForUnity.MlModule.StatModel | |
const int | COMPRESSED_INPUT = 2 |
const int | PREPROCESSED_INPUT = 4 |
const int | RAW_OUTPUT = 1 |
const int | UPDATE_MODEL = 1 |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.MlModule.StatModel | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject | |
DisposableOpenCVObject () | |
DisposableOpenCVObject (bool isEnabledDispose) | |
DisposableOpenCVObject (IntPtr ptr) | |
DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose) | |
Protected Member Functions inherited from OpenCVForUnity.DisposableObject | |
DisposableObject () | |
DisposableObject (bool isEnabledDispose) | |
Additional Inherited Members | |
Package Functions inherited from OpenCVForUnity.MlModule.StatModel | |
Package Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject | |
Properties inherited from OpenCVForUnity.DisposableObject | |
bool | IsDisposed [get, protected set] |
bool | IsEnabledDispose [get, set] |
The class represents a single decision tree or a collection of decision trees.
The current public interface of the class allows user to train only a single decision tree, however the class is capable of storing multiple decision trees and using them for prediction (by summing responses or using a voting schemes), and the derived from DTrees classes (such as RTrees and Boost) use this capability to implement decision tree ensembles.
|
static |
|
static |
Creates the empty model.
The static method creates empty decision tree with the specified parameters. It should be then trained using train method (see StatModel.train). Alternatively, you can load the model from file using Algorithm::load<DTrees>(filename).
|
protectedvirtual |
Reimplemented from OpenCVForUnity.CoreModule.Algorithm.
Reimplemented in OpenCVForUnity.MlModule.RTrees.
int OpenCVForUnity.MlModule.DTrees.getCVFolds | ( | ) |
int OpenCVForUnity.MlModule.DTrees.getMaxCategories | ( | ) |
int OpenCVForUnity.MlModule.DTrees.getMaxDepth | ( | ) |
int OpenCVForUnity.MlModule.DTrees.getMinSampleCount | ( | ) |
float OpenCVForUnity.MlModule.DTrees.getRegressionAccuracy | ( | ) |
bool OpenCVForUnity.MlModule.DTrees.getTruncatePrunedTree | ( | ) |
bool OpenCVForUnity.MlModule.DTrees.getUse1SERule | ( | ) |
bool OpenCVForUnity.MlModule.DTrees.getUseSurrogates | ( | ) |
|
static |
Loads and creates a serialized DTrees from a file.
Use DTree::save to serialize and store an DTree to disk. Load the DTree from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
filepath | path to serialized DTree |
nodeName | name of node containing the classifier |
|
static |
Loads and creates a serialized DTrees from a file.
Use DTree::save to serialize and store an DTree to disk. Load the DTree from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
filepath | path to serialized DTree |
nodeName | name of node containing the classifier |
void OpenCVForUnity.MlModule.DTrees.setCVFolds | ( | int | val | ) |
void OpenCVForUnity.MlModule.DTrees.setMaxCategories | ( | int | val | ) |
void OpenCVForUnity.MlModule.DTrees.setMaxDepth | ( | int | val | ) |
void OpenCVForUnity.MlModule.DTrees.setMinSampleCount | ( | int | val | ) |
void OpenCVForUnity.MlModule.DTrees.setRegressionAccuracy | ( | float | val | ) |
void OpenCVForUnity.MlModule.DTrees.setTruncatePrunedTree | ( | bool | val | ) |
void OpenCVForUnity.MlModule.DTrees.setUse1SERule | ( | bool | val | ) |
void OpenCVForUnity.MlModule.DTrees.setUseSurrogates | ( | bool | val | ) |
|
static |
|
static |
|
static |
|
static |