Class RTrees
- Namespace
- OpenCvSharp.ML
- Assembly
- OpenCvSharp.dll
The class implements the random forest predictor.
public class RTrees : DTrees, IDisposable, ICvPtrHolder
- Inheritance
-
RTrees
- Implements
- Inherited Members
Constructors
RTrees(nint)
Creates instance by raw pointer cv::ml::RTrees*
protected RTrees(nint p)
Parameters
pnint
Properties
ActiveVarCount
The size of the randomly selected subset of features at each tree node and that are used to find the best split(s).
public int ActiveVarCount { get; set; }
Property Value
CalculateVarImportance
If true then variable importance will be calculated and then it can be retrieved by RTrees::getVarImportance. Default value is false.
public bool CalculateVarImportance { get; set; }
Property Value
TermCriteria
The termination criteria that specifies when the training algorithm stops.
public TermCriteria TermCriteria { get; set; }
Property Value
Methods
Create()
Creates the empty model.
public static RTrees Create()
Returns
DisposeManaged()
Releases managed resources
protected override void DisposeManaged()
GetVarImportance()
Returns the variable importance array. The method returns the variable importance vector, computed at the training stage when CalculateVarImportance is set to true. If this flag was set to false, the empty matrix is returned.
public Mat GetVarImportance()
Returns
Load(string)
Loads and creates a serialized model from a file.
public static RTrees Load(string filePath)
Parameters
filePathstring
Returns
LoadFromString(string)
Loads algorithm from a String.
public static RTrees LoadFromString(string strModel)
Parameters
strModelstringhe string variable containing the model you want to load.