Share via


ChoiceOption Class

Definition

This class represent option for discrete value, such as string, enum, etc..

[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
Inheritance
ChoiceOption
Attributes

Constructors

ChoiceOption(Object[])

Create ChoiceOption with choices

ChoiceOption(Object[], Object)

Create ChoiceOption with choices and defaultChoice.

Properties

Choices

Get all choices.

Default

Gets the default value which is mapping to feature space (if exists).

(Inherited from OptionBase)
FeatureSpaceDim

the dimension of feature space, which is equal to the output length of SampleFromFeatureSpace(Double[]).

Step

Gets the step of this option. The Step is used to determine the number of grid this option should be divided into. In ChoiceOption, it's always the length of Choices. And in UniformNumericOption, it's always [null]. And in SearchSpace, it's a combination of all Step in its options.

Methods

MappingToFeatureSpace(Parameter)

mapping value to [0, 1) uniform distribution.

SampleFromFeatureSpace(Double[])

sample from [0,1) uniform distribution.

Applies to