Class BanditPolicy
java.lang.Object
com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy
com.azure.resourcemanager.machinelearning.models.BanditPolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<EarlyTerminationPolicy>
Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BanditPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of BanditPolicy from the JsonReader.Get the policyType property: [Required] Name of policy configuration.Get the slackAmount property: Absolute distance allowed from the best performing run.Get the slackFactor property: Ratio of the allowed distance from the best performing run.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDelayEvaluation(Integer delayEvaluation) Set the delayEvaluation property: Number of intervals by which to delay the first evaluation.withEvaluationInterval(Integer evaluationInterval) Set the evaluationInterval property: Interval (number of runs) between policy evaluations.withSlackAmount(Float slackAmount) Set the slackAmount property: Absolute distance allowed from the best performing run.withSlackFactor(Float slackFactor) Set the slackFactor property: Ratio of the allowed distance from the best performing run.Methods inherited from class com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy
delayEvaluation, evaluationIntervalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
BanditPolicy
public BanditPolicy()Creates an instance of BanditPolicy class.
-
-
Method Details
-
policyType
Get the policyType property: [Required] Name of policy configuration.- Overrides:
policyTypein classEarlyTerminationPolicy- Returns:
- the policyType value.
-
slackFactor
Get the slackFactor property: Ratio of the allowed distance from the best performing run.- Returns:
- the slackFactor value.
-
withSlackFactor
Set the slackFactor property: Ratio of the allowed distance from the best performing run.- Parameters:
slackFactor- the slackFactor value to set.- Returns:
- the BanditPolicy object itself.
-
slackAmount
Get the slackAmount property: Absolute distance allowed from the best performing run.- Returns:
- the slackAmount value.
-
withSlackAmount
Set the slackAmount property: Absolute distance allowed from the best performing run.- Parameters:
slackAmount- the slackAmount value to set.- Returns:
- the BanditPolicy object itself.
-
withEvaluationInterval
Set the evaluationInterval property: Interval (number of runs) between policy evaluations.- Overrides:
withEvaluationIntervalin classEarlyTerminationPolicy- Parameters:
evaluationInterval- the evaluationInterval value to set.- Returns:
- the EarlyTerminationPolicy object itself.
-
withDelayEvaluation
Set the delayEvaluation property: Number of intervals by which to delay the first evaluation.- Overrides:
withDelayEvaluationin classEarlyTerminationPolicy- Parameters:
delayEvaluation- the delayEvaluation value to set.- Returns:
- the EarlyTerminationPolicy object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classEarlyTerminationPolicy- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<EarlyTerminationPolicy>- Overrides:
toJsonin classEarlyTerminationPolicy- Throws:
IOException
-
fromJson
Reads an instance of BanditPolicy from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of BanditPolicy 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 BanditPolicy.
-