共用方式為


RegressionTreeBase 類別

定義

用來向使用者公開 Microsoft.ML.Trainers.FastTree.InternalRegressionTree 的 和 Microsoft.ML.Trainers.FastTree.InternalQuantileRegressionTree 屬性的容器基類。 這個類別不應該是可變的,因此它包含許多隻讀成員。

public abstract class RegressionTreeBase
type RegressionTreeBase = class
Public MustInherit Class RegressionTreeBase
繼承
RegressionTreeBase
衍生

屬性

CategoricalSplitFlags

判斷分割函式的類型。 如果 CategoricalSplitFlags [i] 為 true,則第 i 個節點會使用類別分割函式。 否則,會使用傳統的數值分割。

LeafValues

LeafValues[i] 是第一個分葉的學習值。

LeftChild

LeftChild[i] 是 (1 時使用的 i 節點子索引,) [i] 所編制索引 NumericalSplitFeatureIndexes 的數值特徵小於或等於臨界值 NumericalSplitThresholds [i],或 (2) 使用 nodeIndex=i 傳回值所編制索引 GetCategoricalCategoricalSplitFeatureRangeAt(Int32) 的類別特徵不是 nodeIndex=i 的 GetCategoricalSplitFeaturesAt(Int32) 子集。 請注意,只有在 [i] 為 false 時 CategoricalSplitFlags ,才會發生 (1) ,否則會發生 (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

NumberOfLeaves

樹狀結構中的葉數。 請注意, NumberOfLeaves 不會將非分葉節點納入考慮。

NumberOfNodes

樹狀結構中的節點數目。 這不包含任何分葉。 例如,具有 node0-node1、node0-leaf3 > 、node1-leaf1 > 、node1-leaf2 NumberOfNodes>> 的 NumberOfLeaves 樹狀結構,分別應該是 2 和 3。

NumericalSplitFeatureIndexes

NumericalSplitFeatureIndexes[i] 是使用第一個節點的分割函數的功能索引。 只有在 [i] 為 false 時 CategoricalSplitFlags ,這個值才有效。

NumericalSplitThresholds

NumericalSplitThresholds[i] 是 [i] 所編制索引 NumericalSplitFeatureIndexes 功能的臨界值,其中 i 是 i 節點的索引 (例如,i 是) 的第 2 個節點的 Microsoft.ML.Trainers.FastTree.RegressionTreeBase._tree 1。

RightChild

RightChild[i] 是當兩個條件 (1) 和 (2) LeftChild 兩個條件時,第一個節點的子索引不是 true 時使用的子索引。 其傳回值遵循 中使用的 LeftChild 格式。

SplitGains

藉由在節點上分割資料來取得的收益。 其第 i 個值是從 計算到第一個節點的分割。

方法

GetCategoricalCategoricalSplitFeatureRangeAt(Int32)

傳回由 nodeIndex 編制索引之節點所使用的類別閾值範圍。 nodeIndex 所編制索引節點的類別分割可以一次考慮多個連續輸入功能;其範圍是由 GetCategoricalCategoricalSplitFeatureRangeAt(Int32) 指定。 傳回的值一律是 2 個專案陣列;它的第 1 個元素是起始索引,而第 2 個元素則是特徵區段的結束索引。 只有在 [nodeIndex] 為 true 時 CategoricalSplitFlags ,傳回的值才有效。

GetCategoricalSplitFeaturesAt(Int32)

傳回 nodeIndex 所編制索引之節點所使用的類別閾值。 如果考慮的輸入功能不符合 傳 GetCategoricalSplitFeaturesAt(Int32) 回的任何值,我們會將其稱為小於臨界值事件,因此 LeftChild [nodeIndex] 是輸入應該接著執行的子節點。 只有在 [nodeIndex] 為 true 時 CategoricalSplitFlags ,傳回的值才有效。

適用於