- 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
Creates an instance of Objective class.
-
Method Summary
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
Set the goal property: [Required] Defines supported metric goals for hyperparameter tuning.
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
Get the primaryMetric property: [Required] Name of the metric to optimize.
- Returns:
- the primaryMetric value.
-
withPrimaryMetric
Set the primaryMetric property: [Required] Name of the metric to optimize.
- Parameters:
primaryMetric - the primaryMetric value to set.
- Returns:
- the Objective object itself.
-
goal
Get the goal property: [Required] Defines supported metric goals for hyperparameter tuning.
- Returns:
- the goal value.
-
withGoal
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
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.