共用方式為


ChoiceOption 類別

定義

這個類別代表離散值的選項,例如字串、列舉等。

[System.Text.Json.Serialization.JsonConverter(typeof(Microsoft.ML.SearchSpace.Converter.ChoiceOptionConverter))]
public sealed class ChoiceOption : Microsoft.ML.SearchSpace.Option.OptionBase
[<System.Text.Json.Serialization.JsonConverter(typeof(Microsoft.ML.SearchSpace.Converter.ChoiceOptionConverter))>]
type ChoiceOption = class
    inherit OptionBase
Public NotInheritable Class ChoiceOption
Inherits OptionBase
繼承
ChoiceOption
屬性

建構函式

ChoiceOption(Object[])

使用 建立ChoiceOptionchoices

ChoiceOption(Object[], Object)

使用 choicesdefaultChoice建立 ChoiceOption

屬性

Choices

取得所有選擇。

Default

取得預設值,如果存在,則會對應至功能空間 () 。

(繼承來源 OptionBase)
FeatureSpaceDim

功能空間的維度,等於的 SampleFromFeatureSpace(Double[])輸出長度。

Step

取得這個選項的步驟。 Step用來判斷這個選項應該分割成的方格數目。 在 中 ChoiceOption,它一律是 的 Choices長度。 在 中 UniformNumericOption,它一律為 [null]。 在 中 SearchSpace,它是其選項中所有 Step 的組合。

方法

MappingToFeatureSpace(Parameter)

將值對應至 [0, 1) 統一分佈。

SampleFromFeatureSpace(Double[])

來自 [0,1) 統一分佈的範例。

適用於