19 instantiations of ChoiceOption
Microsoft.ML.AutoML (1)
SweepableEstimator\SweepablePipeline.cs (1)
40
var choiceOption = new
ChoiceOption
(schemaOptions);
Microsoft.ML.AutoML.Samples (2)
Sweepable\SearchSpaceExample.cs (2)
28
myParameterSearchSpace2["BoolOption"] = new
ChoiceOption
(true, false);
29
myParameterSearchSpace2["StrOption"] = new
ChoiceOption
("a", "b", "c");
Microsoft.ML.SearchSpace (7)
Converter\ChoiceOptionConverter.cs (1)
32
return new
ChoiceOption
(schema.Choices, schema.Default);
SearchSpace.cs (6)
217
ChoiceAttribute choice => choice.DefaultValue == null ? new
ChoiceOption
(choice.Candidates) : new
ChoiceOption
(choice.Candidates, defaultChoice: choice.DefaultValue),
228
BooleanChoiceAttribute booleanChoice => new
ChoiceOption
(new object[] { true, false }, defaultChoice: booleanChoice.DefaultValue),
264
ChoiceAttribute choice => choice.DefaultValue == null ? new
ChoiceOption
(choice.Candidates) : new
ChoiceOption
(choice.Candidates, defaultChoice: choice.DefaultValue),
275
BooleanChoiceAttribute booleanChoice => new
ChoiceOption
(new object[] { true, false }, defaultChoice: booleanChoice.DefaultValue),
Microsoft.ML.SearchSpace.Tests (9)
ChoiceOptionTest.cs (6)
21
var option = new
ChoiceOption
("a", "b", "c");
35
var option = new
ChoiceOption
("a");
43
var option = new
ChoiceOption
("a", "b", "c");
48
option = new
ChoiceOption
("a", "b", "c", "d");
57
var option = new
ChoiceOption
("b");
68
searchSpace["choice"] = new
ChoiceOption
(1, 2, 3);
SearchSpaceTest.cs (3)
220
searchSpace.Add("choice", new
ChoiceOption
("a", "b", "c"));
223
anotherNestOption["choice"] = new
ChoiceOption
("d", "e");
245
searchSpace.Add("choice", new
ChoiceOption
("a", "b", "c"));
16 references to ChoiceOption
Microsoft.ML.AutoML (1)
SweepableEstimator\SweepablePipeline.cs (1)
40
var
choiceOption = new ChoiceOption(schemaOptions);
Microsoft.ML.SearchSpace (11)
Converter\ChoiceOptionConverter.cs (3)
14
internal class ChoiceOptionConverter : JsonConverter<
ChoiceOption
>
28
public override
ChoiceOption
Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
35
public override void Write(Utf8JsonWriter writer,
ChoiceOption
value, JsonSerializerOptions options)
Converter\OptionConverter.cs (2)
29
return JsonSerializer.Deserialize<
ChoiceOption
>(ref reader, options);
52
else 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)
21
var
option = new ChoiceOption("a", "b", "c");
35
var
option = new ChoiceOption("a");
43
var
option = new ChoiceOption("a", "b", "c");
57
var
option = new ChoiceOption("b");