RandomSamplingAlgorithm Class

public final class RandomSamplingAlgorithm
extends SamplingAlgorithm

Defines a Sampling Algorithm that generates values randomly.

Constructor Summary

Constructor Description
RandomSamplingAlgorithm()

Creates an instance of RandomSamplingAlgorithm class.

Method Summary

Modifier and Type Method and Description
static RandomSamplingAlgorithm fromJson(JsonReader jsonReader)

Reads an instance of RandomSamplingAlgorithm from the JsonReader.

RandomSamplingAlgorithmRule rule()

Get the rule property: The specific type of random algorithm.

SamplingAlgorithmType samplingAlgorithmType()

Get the samplingAlgorithmType property: [Required] The algorithm used for generating hyperparameter values, along with configuration properties.

Integer seed()

Get the seed property: An optional integer to use as the seed for random number generation.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RandomSamplingAlgorithm withRule(RandomSamplingAlgorithmRule rule)

Set the rule property: The specific type of random algorithm.

RandomSamplingAlgorithm withSeed(Integer seed)

Set the seed property: An optional integer to use as the seed for random number generation.

Methods inherited from SamplingAlgorithm

Methods inherited from java.lang.Object

Constructor Details

RandomSamplingAlgorithm

public RandomSamplingAlgorithm()

Creates an instance of RandomSamplingAlgorithm class.

Method Details

fromJson

public static RandomSamplingAlgorithm fromJson(JsonReader jsonReader)

Reads an instance of RandomSamplingAlgorithm from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RandomSamplingAlgorithm if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the RandomSamplingAlgorithm.

rule

public RandomSamplingAlgorithmRule rule()

Get the rule property: The specific type of random algorithm.

Returns:

the rule value.

samplingAlgorithmType

public SamplingAlgorithmType samplingAlgorithmType()

Get the samplingAlgorithmType property: [Required] The algorithm used for generating hyperparameter values, along with configuration properties.

Overrides:

RandomSamplingAlgorithm.samplingAlgorithmType()

Returns:

the samplingAlgorithmType value.

seed

public Integer seed()

Get the seed property: An optional integer to use as the seed for random number generation.

Returns:

the seed value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

RandomSamplingAlgorithm.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

RandomSamplingAlgorithm.validate()

withRule

public RandomSamplingAlgorithm withRule(RandomSamplingAlgorithmRule rule)

Set the rule property: The specific type of random algorithm.

Parameters:

rule - the rule value to set.

Returns:

the RandomSamplingAlgorithm object itself.

withSeed

public RandomSamplingAlgorithm withSeed(Integer seed)

Set the seed property: An optional integer to use as the seed for random number generation.

Parameters:

seed - the seed value to set.

Returns:

the RandomSamplingAlgorithm object itself.

Applies to