SearchSpace Class

Definition

This class is used to represent a set of OptionBase, which can be either one of ChoiceOption, UniformNumericOption or Microsoft.ML.SearchSpace.Option.NestOption.

[System.Text.Json.Serialization.JsonConverter(typeof(Microsoft.ML.SearchSpace.Converter.SearchSpaceConverter))]
public class SearchSpace : Microsoft.ML.SearchSpace.Option.OptionBase, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,Microsoft.ML.SearchSpace.Option.OptionBase>>, System.Collections.Generic.IDictionary<string,Microsoft.ML.SearchSpace.Option.OptionBase>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Microsoft.ML.SearchSpace.Option.OptionBase>>
[<System.Text.Json.Serialization.JsonConverter(typeof(Microsoft.ML.SearchSpace.Converter.SearchSpaceConverter))>]
type SearchSpace = class
    inherit OptionBase
    interface IDictionary<string, OptionBase>
    interface ICollection<KeyValuePair<string, OptionBase>>
    interface seq<KeyValuePair<string, OptionBase>>
    interface IEnumerable
Public Class SearchSpace
Inherits OptionBase
Implements ICollection(Of KeyValuePair(Of String, OptionBase)), IDictionary(Of String, OptionBase), IEnumerable(Of KeyValuePair(Of String, OptionBase))
Inheritance
SearchSpace
Derived
Attributes
Implements

Constructors

SearchSpace()

Initializes a new instance of the Object class.

SearchSpace(Type, Parameter) System.Object.#ctor(System.Type,Microsoft.ML.SearchSpace.Parameter)

Properties

Count

Gets the number of elements contained in the ICollection<T>.

Default

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

FeatureSpaceDim

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

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

Item[String]

Gets or sets the element with the specified key.

Keys

Gets an ICollection<T> containing the keys of the IDictionary<TKey,TValue>.

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.

Values

Gets an ICollection<T> containing the values in the IDictionary<TKey,TValue>.

Methods

Add(KeyValuePair<String,OptionBase>)

Adds an item to the ICollection<T>.

Add(String, OptionBase)

Adds an element with the provided key and value to the IDictionary<TKey,TValue>.

Clear()

Removes all items from the ICollection<T>.

Contains(KeyValuePair<String,OptionBase>)

Determines whether the ICollection<T> contains a specific value.

ContainsKey(String)

Determines whether the IDictionary<TKey,TValue> contains an element with the specified key.

CopyTo(KeyValuePair<String,OptionBase>[], Int32)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

GetEnumerator()

Returns an enumerator that iterates through the collection.

GetHashCode()

Serves as the default hash function.

MappingToFeatureSpace(Parameter)

mapping value to [0, 1) uniform distribution.

Remove(KeyValuePair<String,OptionBase>)

Removes the first occurrence of a specific object from the ICollection<T>.

Remove(String)

Removes the element with the specified key from the IDictionary<TKey,TValue>.

SampleFromFeatureSpace(Double[])

sample from [0,1) uniform distribution.

TryGetValue(String, OptionBase) System.Object.TryGetValue(System.String,Microsoft.ML.SearchSpace.Option.OptionBase@)

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Applies to