QuantileRegressionTree Class

Definition

A container class for exposing Microsoft.ML.Trainers.FastTree.InternalQuantileRegressionTree's attributes to users. This class should not be mutable, so it contains a lot of read-only members. In addition to things inherited from RegressionTreeBase, we add GetLeafSamplesAt(Int32) and GetLeafSampleWeightsAt(Int32) to expose (sub-sampled) training labels falling into the leafIndex-th leaf and their weights.

public sealed class QuantileRegressionTree : Microsoft.ML.Trainers.FastTree.RegressionTreeBase
type QuantileRegressionTree = class
    inherit RegressionTreeBase
Public NotInheritable Class QuantileRegressionTree
Inherits RegressionTreeBase
Inheritance
QuantileRegressionTree

Properties

CategoricalSplitFlags

Determine the types of splitting function. If CategoricalSplitFlags[i] is true, the i-th node's uses categorical splitting function. Otherwise, traditional numerical split is used.

(Inherited from RegressionTreeBase)
LeafValues

LeafValues[i] is the learned value at the i-th leaf.

(Inherited from RegressionTreeBase)
LeftChild

LeftChild[i] is the i-th node's child index used when (1) the numerical feature indexed by NumericalSplitFeatureIndexes[i] is less than or equal to the threshold NumericalSplitThresholds[i], or (2) the categorical features indexed by GetCategoricalCategoricalSplitFeatureRangeAt(Int32)'s returned value with nodeIndex=i is NOT a sub-set of GetCategoricalSplitFeaturesAt(Int32) with nodeIndex=i. Note that the case (1) happens only when CategoricalSplitFlags[i] is false and otherwise (2) occurs. A non-negative returned value means a node (i.e., not a leaf); for example, 2 means the 3rd node in the underlying Microsoft.ML.Trainers.FastTree.RegressionTreeBase._tree. A negative returned value means a leaf; for example, -1 stands for the ~(-1)-th leaf in the underlying Microsoft.ML.Trainers.FastTree.RegressionTreeBase._tree. Note that ~ is the bitwise complement operator in C#; for details, see https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/bitwise-complement-operator.

(Inherited from RegressionTreeBase)
NumberOfLeaves

Number of leaves in the tree. Note that NumberOfLeaves does not take non-leaf nodes into account.

(Inherited from RegressionTreeBase)
NumberOfNodes

Number of nodes in the tree. This doesn't include any leaves. For example, a tree with node0->node1, node0->leaf3, node1->leaf1, node1->leaf2, NumberOfNodes and NumberOfLeaves should be 2 and 3, respectively.

(Inherited from RegressionTreeBase)
NumericalSplitFeatureIndexes

NumericalSplitFeatureIndexes[i] is the feature index used the splitting function of the i-th node. This value is valid only if CategoricalSplitFlags[i] is false.

(Inherited from RegressionTreeBase)
NumericalSplitThresholds

NumericalSplitThresholds[i] is the threshold on feature indexed by NumericalSplitFeatureIndexes[i], where i is the i-th node's index (for example, i is 1 for the 2nd node in Microsoft.ML.Trainers.FastTree.RegressionTreeBase._tree).

(Inherited from RegressionTreeBase)
RightChild

RightChild[i] is the i-th node's child index used when the two conditions, (1) and (2), described in LeftChild's document are not true. Its return value follows the format used in LeftChild.

(Inherited from RegressionTreeBase)
SplitGains

The gains obtained by splitting data at nodes. Its i-th value is computed from to the split at the i-th node.

(Inherited from RegressionTreeBase)

Methods

GetCategoricalCategoricalSplitFeatureRangeAt(Int32)

Return categorical thresholds' range used at node indexed by nodeIndex. A categorical split at node indexed by nodeIndex can consider multiple consecutive input features at one time; their range is specified by GetCategoricalCategoricalSplitFeatureRangeAt(Int32). The returned value is always a 2-element array; its 1st element is the starting index and its 2nd element is the endining index of a feature segment. The returned value is valid only if CategoricalSplitFlags[nodeIndex] is true.

(Inherited from RegressionTreeBase)
GetCategoricalSplitFeaturesAt(Int32)

Return categorical thresholds used at node indexed by nodeIndex. If the considered input feature does NOT matche any of values returned by GetCategoricalSplitFeaturesAt(Int32), we call it a less-than-threshold event and therefore LeftChild[nodeIndex] is the child node that input should go next. The returned value is valid only if CategoricalSplitFlags[nodeIndex] is true.

(Inherited from RegressionTreeBase)
GetLeafSamplesAt(Int32)

Return the training labels falling into the specified leaf.

GetLeafSampleWeightsAt(Int32)

Return the weights for training labels falling into the specified leaf. If GetLeafSamplesAt(Int32) and GetLeafSampleWeightsAt(Int32) use the same input, the i-th returned value of this function is the weight of the i-th label in GetLeafSamplesAt(Int32).

Applies to