azure.ai.anomalydetector package¶
-
class
azure.ai.anomalydetector.
AnomalyDetectorClient
(credential: AzureKeyCredential, endpoint: str, **kwargs: Any)[source]¶ The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis.
- Parameters
credential (AzureKeyCredential) – Credential needed for the client to connect to Azure.
endpoint (str) – Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).
-
detect_change_point
(body: ‘models.ChangePointDetectRequest’, **kwargs: Any) → ’models.ChangePointDetectResponse’¶ Detect change point for the entire series.
Evaluate change point score of every series point.
- Parameters
body (ChangePointDetectRequest) – Time series points and granularity is needed. Advanced model parameters can also be set in the request if needed.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ChangePointDetectResponse, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
detect_entire_series
(body: ‘models.DetectRequest’, **kwargs: Any) → ’models.EntireDetectResponse’¶ Detect anomalies for the entire series in batch.
This operation generates a model using an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.
- Parameters
body (DetectRequest) – Time series points and period if needed. Advanced model parameters can also be set in the request.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
EntireDetectResponse, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError
-
detect_last_point
(body: ‘models.DetectRequest’, **kwargs: Any) → ’models.LastDetectResponse’¶ Detect anomaly status of the latest point in time series.
This operation generates a model using points before the latest one. With this method, only historical points are used to determine whether the target point is an anomaly. The latest point detecting operation matches the scenario of real-time monitoring of business metrics.
- Parameters
body (DetectRequest) – Time series points and period if needed. Advanced model parameters can also be set in the request.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
LastDetectResponse, or the result of cls(response)
- Return type
- Raises
~azure.core.exceptions.HttpResponseError