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

例如,如果您有值為 Count 3 的索引鍵值,則 UInt320 會對應至遺漏的索引鍵值,而 、 23 的其中一個值 1 是有效值,而且不會使用其他值。

建構函式

KeyDataViewType(Type, Int32)

初始化 KeyDataViewType 類別的新執行個體。 這與假設較通用 KeyDataViewType(Type, UInt64) 的建構函式不同,方法是採用 Int32 for count ,以更自然的方式協助使用索引鍵值做為陣列或某種形式清單的列舉。

KeyDataViewType(Type, UInt64)

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

屬性

Count

Count 是 的 KeyDataViewType 基數。

RawType

這個 DataViewType 的原始 Type 。 請注意,這是原始表示類型,而不是 的完整資訊內容 DataViewType

(繼承來源 DataViewType)

方法

Equals(DataViewType)

判斷這個 KeyDataViewType 物件是否等於另一個 DataViewType 實例。 檢查其他專案是否為 的 KeyDataViewType 型別,如果 RawType 相同,則檢查 是否 Count 相同。

Equals(Object)

判斷實例是否 KeyDataViewType 等於另一個 KeyDataViewType 實例。 檢查是否有任何物件是 的類型 KeyDataViewType ,如果 RawType 相同,則檢查 是否相同,以及 是否 Count 相同。

GetHashCode()

擷取雜湊碼。

IsValidDataType(Type)

傳回 true 差異,指定的型別對 有效 KeyDataViewType 。 有效的整數類型為 ByteUInt16UInt32UInt64 ,也就是不帶正負號的整數類型。

ToString()

KeyDataViewType 的字串表示。

適用於