Language

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
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
type ChoiceOption = class
    inherit OptionBase
Public NotInheritable Class ChoiceOption
Inherits OptionBase
Inheritance
ChoiceOption
Attributes

Constructors

Name Description
ChoiceOption(Object[], Object)

Create ChoiceOption with choices and defaultChoice.

ChoiceOption(Object[])

Create ChoiceOption with choices

Properties

Name Description
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

Name Description
MappingToFeatureSpace(Parameter)

mapping value to [0, 1) uniform distribution.

SampleFromFeatureSpace(Double[])

sample from [0,1) uniform distribution.

Applies to