Class RandomSamplingAlgorithm

java.lang.Object
com.azure.resourcemanager.machinelearning.models.SamplingAlgorithm
com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithm
All Implemented Interfaces:
com.azure.json.JsonSerializable<SamplingAlgorithm>

public final class RandomSamplingAlgorithm extends SamplingAlgorithm
Defines a Sampling Algorithm that generates values randomly.
  • Constructor Details

    • RandomSamplingAlgorithm

      public RandomSamplingAlgorithm()
      Creates an instance of RandomSamplingAlgorithm class.
  • Method Details

    • samplingAlgorithmType

      public SamplingAlgorithmType samplingAlgorithmType()
      Get the samplingAlgorithmType property: [Required] The algorithm used for generating hyperparameter values, along with configuration properties.
      Overrides:
      samplingAlgorithmType in class SamplingAlgorithm
      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.
    • 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.
    • rule

      Get the rule property: The specific type of random algorithm.
      Returns:
      the rule value.
    • withRule

      Set the rule property: The specific type of random algorithm.
      Parameters:
      rule - the rule value to set.
      Returns:
      the RandomSamplingAlgorithm object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class SamplingAlgorithm
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SamplingAlgorithm>
      Overrides:
      toJson in class SamplingAlgorithm
      Throws:
      IOException
    • fromJson

      public static RandomSamplingAlgorithm fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.