19 instantiations of ChoiceOption
Microsoft.ML.AutoML (1)
SweepableEstimator\SweepablePipeline.cs (1)
40var choiceOption = new ChoiceOption(schemaOptions);
Microsoft.ML.AutoML.Samples (2)
Sweepable\SearchSpaceExample.cs (2)
28myParameterSearchSpace2["BoolOption"] = new ChoiceOption(true, false); 29myParameterSearchSpace2["StrOption"] = new ChoiceOption("a", "b", "c");
Microsoft.ML.SearchSpace (7)
Converter\ChoiceOptionConverter.cs (1)
32return new ChoiceOption(schema.Choices, schema.Default);
SearchSpace.cs (6)
217ChoiceAttribute choice => choice.DefaultValue == null ? new ChoiceOption(choice.Candidates) : new ChoiceOption(choice.Candidates, defaultChoice: choice.DefaultValue), 228BooleanChoiceAttribute booleanChoice => new ChoiceOption(new object[] { true, false }, defaultChoice: booleanChoice.DefaultValue), 264ChoiceAttribute choice => choice.DefaultValue == null ? new ChoiceOption(choice.Candidates) : new ChoiceOption(choice.Candidates, defaultChoice: choice.DefaultValue), 275BooleanChoiceAttribute booleanChoice => new ChoiceOption(new object[] { true, false }, defaultChoice: booleanChoice.DefaultValue),
Microsoft.ML.SearchSpace.Tests (9)
ChoiceOptionTest.cs (6)
21var option = new ChoiceOption("a", "b", "c"); 35var option = new ChoiceOption("a"); 43var option = new ChoiceOption("a", "b", "c"); 48option = new ChoiceOption("a", "b", "c", "d"); 57var option = new ChoiceOption("b"); 68searchSpace["choice"] = new ChoiceOption(1, 2, 3);
SearchSpaceTest.cs (3)
220searchSpace.Add("choice", new ChoiceOption("a", "b", "c")); 223anotherNestOption["choice"] = new ChoiceOption("d", "e"); 245searchSpace.Add("choice", new ChoiceOption("a", "b", "c"));
16 references to ChoiceOption
Microsoft.ML.AutoML (1)
SweepableEstimator\SweepablePipeline.cs (1)
40var choiceOption = new ChoiceOption(schemaOptions);
Microsoft.ML.SearchSpace (11)
Converter\ChoiceOptionConverter.cs (3)
14internal class ChoiceOptionConverter : JsonConverter<ChoiceOption> 28public override ChoiceOption Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 35public override void Write(Utf8JsonWriter writer, ChoiceOption value, JsonSerializerOptions options)
Converter\OptionConverter.cs (2)
29return JsonSerializer.Deserialize<ChoiceOption>(ref reader, options); 52else if (value is ChoiceOption choiceOption)
Option\ChoiceOption.cs (2)
24/// Create <see cref="ChoiceOption"/> with <paramref name="choices"/> 38/// Create <see cref="ChoiceOption"/> with <paramref name="choices"/> and <paramref name="defaultChoice"/>.
Option\NestOption.cs (1)
14/// This class represent nest option, which is an option that contains other options, like <see cref="ChoiceOption"/>, <see cref="UniformNumericOption"/> or even <see cref="SearchSpace"/> itself.
Option\OptionBase.cs (2)
43/// Gets the step of this option. The <see cref="Step"/> is used to determine the number of grid this option should be divided into. In <see cref="ChoiceOption"/>, it's always the length of 44/// <see cref="ChoiceOption.Choices"/>. And in <see cref="UniformNumericOption"/>, it's always [null]. And in <see cref="ML.SearchSpace.SearchSpace"/>, it's a combination of all <see cref="Step"/> in its options.
SearchSpace.cs (1)
17/// This class is used to represent a set of <see cref="OptionBase"/>, which can be either one of <see cref="ChoiceOption"/>, <see cref="UniformNumericOption"/> or another nested search space.
Microsoft.ML.SearchSpace.Tests (4)
ChoiceOptionTest.cs (4)
21var option = new ChoiceOption("a", "b", "c"); 35var option = new ChoiceOption("a"); 43var option = new ChoiceOption("a", "b", "c"); 57var option = new ChoiceOption("b");