语言

QuantileRegressionTree 类

定义

用于向用户公开 Microsoft.ML.Trainers.FastTree.InternalQuantileRegressionTree属性的容器类。 此类不应可变,因此它包含大量只读成员。 除了继承自 RegressionTreeBase的东西外,我们还添加 GetLeafSamplesAt(Int32) 并 GetLeafSampleWeightsAt(Int32) 公开进入 leafIndex-th 叶及其权重的(子采样)训练标签。

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

属性

名称 说明
CategoricalSplitFlags

确定拆分函数的类型。 如果 CategoricalSplitFlags[i] 为 true,则 i-th 节点使用分类拆分函数。 否则,将使用传统的数字拆分。

(继承自 RegressionTreeBase)
LeafValues

LeafValues[i] 是第一个叶的已学习值。

(继承自 RegressionTreeBase)
LeftChild

LeftChild[i] 是当 (1) 由 NumericalSplitFeatureIndexes[i] 编制索引的数字特征小于或等于阈值 NumericalSplitThresholds[i] 时使用的 i-th 节点的子索引,或 (2) 由 GetCategoricalCategoricalSplitFeatureRangeAt(Int32)'s returned value with nodeIndex=i 为索引的分类特征不是 nodeIndex=i 的 GetCategoricalSplitFeaturesAt(Int32) 子集。 请注意,这种情况(1)仅在 CategoricalSplitFlags[i] 为 false 时发生,否则会发生 (2)。 非负返回的值表示节点(即,而不是叶):例如,2 表示基础 Microsoft.ML.Trainers.FastTree.RegressionTreeBase._tree中的第三个节点。 负返回的值表示叶;例如,-1 代表 ~基础 Microsoft.ML.Trainers.FastTree.RegressionTreeBase._tree中的第-1个叶。 请注意, ~ 是 C# 中的按位补运算符;有关详细信息,请参阅 https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/bitwise-complement-operator。

(继承自 RegressionTreeBase)
NumberOfLeaves

树中的叶数。 请注意, NumberOfLeaves 不考虑非叶节点。

(继承自 RegressionTreeBase)
NumberOfNodes

树中的节点数。 这不包括任何叶子。 例如,具有 node0-node1>、node0-leaf3>、node1-leaf1、node1-leaf2 NumberOfNodes>>的NumberOfLeaves树应分别为 2 和 3。

(继承自 RegressionTreeBase)
NumericalSplitFeatureIndexes

NumericalSplitFeatureIndexes[i] 是使用第 i 节点的拆分函数的功能索引。 仅当 [i] 为 false 时 CategoricalSplitFlags,此值才有效。

(继承自 RegressionTreeBase)
NumericalSplitThresholds

NumericalSplitThresholds[i] 是 [ NumericalSplitFeatureIndexesi] 为功能编制索引的阈值,其中 i 是第二个节点的索引(例如,i 为第二个节点的 Microsoft.ML.Trainers.FastTree.RegressionTreeBase._tree1)。

(继承自 RegressionTreeBase)
RightChild

RightChild[i] 是当文档中描述的 LeftChild两个条件(1)和(2)时使用的 i-th 节点的子索引。 其返回值遵循所使用的 LeftChild格式。

(继承自 RegressionTreeBase)
SplitGains

通过在节点上拆分数据获得的增益。 它的 i-th 值从第 i 节点的拆分计算。

(继承自 RegressionTreeBase)

方法

名称 说明
GetCategoricalCategoricalSplitFeatureRangeAt(Int32)

返回在 nodeIndex 编制索引的节点中使用的分类阈值范围。 由 nodeIndex 编制索引的节点的分类拆分可以一次性考虑多个连续输入特征:其范围由 GetCategoricalCategoricalSplitFeatureRangeAt(Int32). 返回的值始终为 2 元素数组;其第 1 个元素是起始索引,第 2 个元素是特征段的结束索引。 仅当 [nodeIndex] 为 true 时 CategoricalSplitFlags,返回的值才有效。

(继承自 RegressionTreeBase)
GetCategoricalSplitFeaturesAt(Int32)

返回在 nodeIndex 编制索引的节点中使用的分类阈值。 如果已考虑的输入功能与所 GetCategoricalSplitFeaturesAt(Int32)返回的任何值不匹配,我们将它称为小于阈值的事件,因此 LeftChild[nodeIndex] 是输入应接下来返回的子节点。 仅当 [nodeIndex] 为 true 时 CategoricalSplitFlags,返回的值才有效。

(继承自 RegressionTreeBase)
GetLeafSamplesAt(Int32)

返回落入指定叶的训练标签。

GetLeafSampleWeightsAt(Int32)

返回定型标签落入指定叶的权重。 如果 GetLeafSamplesAt(Int32) 并使用 GetLeafSampleWeightsAt(Int32) 相同的输入,则此函数的第 i 个返回值是第 i 个标签的 GetLeafSamplesAt(Int32)权重。

适用于