Class ChangeThresholdCondition
java.lang.Object
com.azure.ai.metricsadvisor.administration.models.ChangeThresholdCondition
Type that describes change-threshold parameters. In change-threshold mode, metrics advisor watch for
any data points that changes over a change percentage compared to the previous data points and detect
such data points as anomalies.
-
Constructor Summary
ConstructorDescriptionChangeThresholdCondition
(double changePercentage, int shiftPoint, boolean isWithinRage, AnomalyDetectorDirection detectorDirection, SuppressCondition suppressCondition) Create an instance of ChangeThresholdCondition describing how to identify anomalies using change-threshold mode. -
Method Summary
Modifier and TypeMethodDescriptionGets the direction that detector should use when comparing the data point change with change threshold.Gets the percentage of change that will consider a data point as an anomaly.Gets the number of data points that detector should look back for comparison.Gets the suppress condition.Gets the flag indicating whether the data point falls within or out of the range is considered as anomaly.setAnomalyDetectorDirection
(AnomalyDetectorDirection detectorDirection) Sets the direction that detector should use when comparing the data point change with change threshold.setChangePercentage
(Double changePercentage) Sets the percentage of change that will consider a data point as an anomaly.setShiftPoint
(Integer shiftPoint) Sets the number of data points that detector should look back for comparison.setSuppressCondition
(SuppressCondition suppressCondition) Sets the suppress condition.setWithinRage
(Boolean withinRange) Sets the flag indicating whether the data point falls within or out of the range is considered as anomaly.
-
Constructor Details
-
ChangeThresholdCondition
public ChangeThresholdCondition(double changePercentage, int shiftPoint, boolean isWithinRage, AnomalyDetectorDirection detectorDirection, SuppressCondition suppressCondition) Create an instance of ChangeThresholdCondition describing how to identify anomalies using change-threshold mode.- Parameters:
changePercentage
- the percentage of change that will considered as an anomaly, the data point will be compared with previously captured data points for computing the change.shiftPoint
- the number of data points that detector should look back for comparison.isWithinRage
- when set to true, data point is an anomaly when the value falls in the range; in this case, detectorDirection must be Both. When set false, the data point is an anomaly when the value falls out of the range.detectorDirection
- must beAnomalyDetectorDirection.BOTH
whenisWithinRage
is true. WhenisWithinRage
is false, AnAnomalyDetectorDirection.UP
value indicates that the data point should be considered as an anomaly, if its changes (compared to previous data points) more than thechangePercentage
.AnomalyDetectorDirection.DOWN
value means a data point should be considered as anomaly, if the change (compared to previous data points) falls below negatedchangePercentage
value.suppressCondition
- the condition to aggregate the anomaly detection reporting, suppressing the reporting of individual anomalies helps to avoid noises, especially if the metrics have fine granularity.
-
-
Method Details
-
getChangePercentage
Gets the percentage of change that will consider a data point as an anomaly.- Returns:
- the change percentage value.
-
getShiftPoint
Gets the number of data points that detector should look back for comparison.- Returns:
- the shift point value.
-
isWithinRange
Gets the flag indicating whether the data point falls within or out of the range is considered as anomaly.- Returns:
- the withinRange value.
-
getAnomalyDetectorDirection
Gets the direction that detector should use when comparing the data point change with change threshold.- Returns:
- the detector direction.
-
getSuppressCondition
Gets the suppress condition.- Returns:
- the suppress condition value.
-
setChangePercentage
Sets the percentage of change that will consider a data point as an anomaly.- Parameters:
changePercentage
- the change percentage value.- Returns:
- the ChangeThresholdCondition object itself.
-
setShiftPoint
Sets the number of data points that detector should look back for comparison.- Parameters:
shiftPoint
- the shift point value.- Returns:
- the ChangeThresholdCondition object itself.
-
setWithinRage
Sets the flag indicating whether the data point falls within or out of the range is considered as anomaly.- Parameters:
withinRange
- the withinRange value.- Returns:
- the ChangeThresholdCondition object itself.
-
setAnomalyDetectorDirection
public ChangeThresholdCondition setAnomalyDetectorDirection(AnomalyDetectorDirection detectorDirection) Sets the direction that detector should use when comparing the data point change with change threshold.- Parameters:
detectorDirection
- the detector direction- Returns:
- the ChangeThresholdCondition object itself.
-
setSuppressCondition
Sets the suppress condition.- Parameters:
suppressCondition
- the suppress condition- Returns:
- the ChangeThresholdCondition object itself.
-