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

public final class Objective extends Object implements com.azure.json.JsonSerializable<Objective>
Optimization objective.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of Objective class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Objective
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Objective from the JsonReader.
    Get the goal property: [Required] Defines supported metric goals for hyperparameter tuning.
    Get the primaryMetric property: [Required] Name of the metric to optimize.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withGoal(Goal goal)
    Set the goal property: [Required] Defines supported metric goals for hyperparameter tuning.
    withPrimaryMetric(String primaryMetric)
    Set the primaryMetric property: [Required] Name of the metric to optimize.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • Objective

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

    • primaryMetric

      public String primaryMetric()
      Get the primaryMetric property: [Required] Name of the metric to optimize.
      Returns:
      the primaryMetric value.
    • withPrimaryMetric

      public Objective withPrimaryMetric(String primaryMetric)
      Set the primaryMetric property: [Required] Name of the metric to optimize.
      Parameters:
      primaryMetric - the primaryMetric value to set.
      Returns:
      the Objective object itself.
    • goal

      public Goal goal()
      Get the goal property: [Required] Defines supported metric goals for hyperparameter tuning.
      Returns:
      the goal value.
    • withGoal

      public Objective withGoal(Goal goal)
      Set the goal property: [Required] Defines supported metric goals for hyperparameter tuning.
      Parameters:
      goal - the goal value to set.
      Returns:
      the Objective object itself.
    • validate

      public void validate()
      Validates the instance.
      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<Objective>
      Throws:
      IOException
    • fromJson

      public static Objective fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of Objective from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of Objective if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the Objective.