KeyDataViewType 類別

定義

類型代表類別或列舉值,最常用於多類別分類模型中的標籤值。

public sealed class KeyDataViewType : Microsoft.ML.Data.PrimitiveDataViewType
type KeyDataViewType = class
    inherit PrimitiveDataViewType
Public NotInheritable Class KeyDataViewType
Inherits PrimitiveDataViewType
繼承

備註

底層的 .NET 類型是無符號整數類型之一。 預設為 UInt32,但也可以是 ByteUInt16UInt64。 儘管鍵是數值型別,但資訊本身並非數字化,因此通常算術並不具意義。

遺失值會映射為 0。

集合的第一個非缺失值總是 1

其他值則可達 。Count

例如,若你的鍵值 a Count 為 3,則UInt32該值0對應缺失的鍵值,且其中 、 2、 或 3 的值1為有效值,且不使用其他值。

建構函式

名稱 Description
KeyDataViewType(Type, Int32)

初始化 KeyDataViewType 類別的新執行個體。 這與假設上更一般 KeyDataViewType(Type, UInt64) 的構造器不同,因為它取一個 Int32count以更自然地說明鍵值被用作某種陣列或列表的列舉。

KeyDataViewType(Type, UInt64)

初始化 KeyDataViewType 類別的新執行個體。

屬性

名稱 Description
Count

Count 是 的 KeyDataViewType基數。

RawType

這個的原始碼TypeDataViewType。 請注意,這是原始表示型態,而非完整的資訊內容 DataViewType

(繼承來源 DataViewType)

方法

名稱 Description
Equals(DataViewType)

判斷這個 KeyDataViewType 物件是否等於另一個 DataViewType 實例。 檢查另一個項目是否屬於 的 KeyDataViewType類型,是否 RawType 相同,以及是否 Count 相同。

Equals(Object)

判斷一個 KeyDataViewType 實例是否等於另一個 KeyDataViewType 實例。 檢查任何物件是否為 的 KeyDataViewType類型,且 RawType 是否相同 Count ,且 是否相同。

GetHashCode()

取得雜湊碼。

IsValidDataType(Type)

回傳真,當給定型別對 KeyDataViewType有效時。 有效的是 ByteUInt16UInt32UInt64,也就是無符號整數型別。

ToString()

字串表示。KeyDataViewType

適用於