Show / Hide Table of Contents

Class DTrees

Decision tree

Inheritance
System.Object
DisposableObject
DisposableCvObject
Algorithm
StatModel
DTrees
Boost
RTrees
Implements
ICvPtrHolder
Inherited Members
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 DTrees : StatModel, ICvPtrHolder

Constructors

| Improve this Doc View Source

DTrees()

Declaration
protected DTrees()
| Improve this Doc View Source

DTrees(IntPtr)

Creates instance by raw pointer cv::ml::SVM*

Declaration
protected DTrees(IntPtr p)
Parameters
Type Name Description
IntPtr p

Properties

| Improve this Doc View Source

CVFolds

If CVFolds > 1 then algorithms prunes the built decision tree using K-fold cross-validation procedure where K is equal to CVFolds. Default value is 10.

Declaration
public int CVFolds { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

MaxCategories

Cluster possible values of a categorical variable into K < =maxCategories clusters to find a suboptimal split.

Declaration
public int MaxCategories { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

MaxDepth

The maximum possible depth of the tree.

Declaration
public int MaxDepth { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

MinSampleCount

If the number of samples in a node is less than this parameter then the node will not be split. Default value is 10.

Declaration
public int MinSampleCount { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Priors

The array of a priori class probabilities, sorted by the class label value.

Declaration
public Mat Priors { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

RegressionAccuracy

Termination criteria for regression trees. If all absolute differences between an estimated value in a node and values of train samples in this node are less than this parameter then the node will not be split further. Default value is 0.01f.

Declaration
public float RegressionAccuracy { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

TruncatePrunedTree

If true then pruned branches are physically removed from the tree. Otherwise they are retained and it is possible to get results from the original unpruned (or pruned less aggressively) tree. Default value is true.

Declaration
public bool TruncatePrunedTree { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Use1SERule

If true then a pruning will be harsher. This will make a tree more compact and more resistant to the training data noise but a bit less accurate. Default value is true.

Declaration
public bool Use1SERule { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

UseSurrogates

If true then surrogate splits will be built. These splits allow to work with missing data and compute variable importance correctly. Default value is false.

Declaration
public bool UseSurrogates { get; set; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

Create()

Creates the empty model.

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

DisposeManaged()

Releases managed resources

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

DisposeUnmanaged()

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

Get()

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

GetNodes()

Returns all the nodes. all the node indices are indices in the returned vector

Declaration
public DTrees.Node[] GetNodes()
Returns
Type Description
DTrees.Node[]
| Improve this Doc View Source

GetRoots()

Returns indices of root nodes

Declaration
public int[] GetRoots()
Returns
Type Description
System.Int32[]
| Improve this Doc View Source

GetSplits()

Returns all the splits. all the split indices are indices in the returned vector

Declaration
public DTrees.Split[] GetSplits()
Returns
Type Description
DTrees.Split[]
| Improve this Doc View Source

GetSubsets()

Returns all the bitsets for categorical splits. Split::subsetOfs is an offset in the returned vector

Declaration
public int[] GetSubsets()
Returns
Type Description
System.Int32[]
| Improve this Doc View Source

Load(String)

Loads and creates a serialized model from a file.

Declaration
public static DTrees Load(string filePath)
Parameters
Type Name Description
System.String filePath
Returns
Type Description
DTrees
| Improve this Doc View Source

LoadFromString(String)

Loads algorithm from a String.

Declaration
public static DTrees LoadFromString(string strModel)
Parameters
Type Name Description
System.String strModel

he string variable containing the model you want to load.

Returns
Type Description
DTrees

Implements

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