Show / Hide Table of Contents

Class RTrees

The class implements the random forest predictor.

Inheritance
System.Object
DisposableObject
DisposableCvObject
Algorithm
StatModel
DTrees
RTrees
Implements
ICvPtrHolder
Inherited Members
DTrees.MaxCategories
DTrees.MaxDepth
DTrees.MinSampleCount
DTrees.CVFolds
DTrees.UseSurrogates
DTrees.Use1SERule
DTrees.TruncatePrunedTree
DTrees.RegressionAccuracy
DTrees.Priors
DTrees.GetRoots()
DTrees.GetNodes()
DTrees.GetSplits()
DTrees.GetSubsets()
StatModel.GetVarCount()
StatModel.Empty()
StatModel.IsTrained()
StatModel.IsClassifier()
StatModel.Train(TrainData, Int32)
StatModel.Train(InputArray, SampleTypes, InputArray)
StatModel.CalcError(TrainData, Boolean, OutputArray)
StatModel.Predict(InputArray, OutputArray, StatModel.Flags)
Algorithm.Write(FileStorage)
Algorithm.Read(FileNode)
Algorithm.Save(String)
Algorithm.GetDefaultName()
DisposableCvObject.ptr
DisposableCvObject.CvPtr
DisposableObject.DataHandle
DisposableObject.IsDisposed
DisposableObject.IsEnabledDispose
DisposableObject.AllocatedMemory
DisposableObject.AllocatedMemorySize
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.AllocGCHandle(Object)
DisposableObject.AllocMemory(Int32)
DisposableObject.NotifyMemoryPressure(Int64)
DisposableObject.ThrowIfDisposed()
Namespace: OpenCvSharp.ML
Assembly: OpenCvSharp.dll
Syntax
public class RTrees : DTrees, ICvPtrHolder

Constructors

| Improve this Doc View Source

RTrees(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 Source

ActiveVarCount

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
| Improve this Doc View Source

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
| Improve this Doc View Source

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 Source

Create()

Creates the empty model.

Declaration
public static RTrees Create()
Returns
Type Description
RTrees
| Improve this Doc View Source

DisposeManaged()

Releases managed resources

Declaration
protected override void DisposeManaged()
Overrides
DTrees.DisposeManaged()
| Improve this Doc View Source

DisposeUnmanaged()

Declaration
protected override void DisposeUnmanaged()
Overrides
DTrees.DisposeUnmanaged()
| Improve this Doc View Source

Get()

Declaration
public override IntPtr Get()
Returns
Type Description
IntPtr
Overrides
DTrees.Get()
| Improve this Doc View Source

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.

Declaration
public Mat GetVarImportance()
Returns
Type Description
Mat
| Improve this Doc View Source

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
| Improve this Doc View Source

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

Implements

ICvPtrHolder
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX