Class RTrees
The class implements the random forest predictor.
Implements
Inherited Members
Namespace: OpenCvSharp.ML
Assembly: OpenCvSharp.dll
Syntax
public class RTrees : DTrees, ICvPtrHolder
Constructors
| Improve this Doc View SourceRTrees(IntPtr)
Creates instance by raw pointer cv::ml::RTrees*
Declaration
protected RTrees(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | p |
Properties
| Improve this Doc View SourceActiveVarCount
The size of the randomly selected subset of features at each tree node and that are used to find the best split(s).
Declaration
public int ActiveVarCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
CalculateVarImportance
If true then variable importance will be calculated and then it can be retrieved by RTrees::getVarImportance. Default value is false.
Declaration
public bool CalculateVarImportance { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TermCriteria
The termination criteria that specifies when the training algorithm stops.
Declaration
public TermCriteria TermCriteria { get; set; }
Property Value
Type | Description |
---|---|
OpenCvSharp.TermCriteria |
Methods
| Improve this Doc View SourceCreate()
Creates the empty model.
Declaration
public static RTrees Create()
Returns
Type | Description |
---|---|
RTrees |
DisposeManaged()
Releases managed resources
Declaration
protected override void DisposeManaged()
Overrides
| Improve this Doc View SourceGetVarImportance()
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.
Declaration
public Mat GetVarImportance()
Returns
Type | Description |
---|---|
Mat |
Load(String)
Loads and creates a serialized model from a file.
Declaration
public static RTrees Load(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath |
Returns
Type | Description |
---|---|
RTrees |
LoadFromString(String)
Loads algorithm from a String.
Declaration
public static RTrees LoadFromString(string strModel)
Parameters
Type | Name | Description |
---|---|---|
System.String | strModel | he string variable containing the model you want to load. |
Returns
Type | Description |
---|---|
RTrees |