# azure.cognitiveservices.anomalydetector package

## Submodules

- azure.cognitiveservices.anomalydetector.models module
- azure.cognitiveservices.anomalydetector.operations module

## Module contents

class `azure.cognitiveservices.anomalydetector.``AnomalyDetectorClient`(endpoint, credentials)

  Bases: `msrest.service_client.SDKClient`

  The Anomaly Detector API detects anomalies automatically in time series data. It supports two functionalities, one is for detecting the whole series with model trained by the timeseries, another is detecting last point with model trained by points before. By using this service, business customers can discover incidents and establish a logic flow for root cause analysis.

  Variables: | config (AnomalyDetectorClientConfiguration) – Configuration for client.

  Parameters:

  - endpoint (str) – Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).
  - credentials (None) – Subscription credentials which uniquely identify client subscription.

  `entire_detect`(body, custom_headers=None, raw=False, **operation_config)

    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 (Request) – Time series points and period if needed. Advanced model parameters can also be set in the request.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | EntireDetectResponse or ClientRawResponse if raw=true
    Return type: | EntireDetectResponse or ClientRawResponse
    Raises: | `APIErrorException`

  `last_detect`(body, custom_headers=None, raw=False, **operation_config)

    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 (Request) – Time series points and period if needed. Advanced model parameters can also be set in the request.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | LastDetectResponse or ClientRawResponse if raw=true
    Return type: | LastDetectResponse or ClientRawResponse
    Raises: | `APIErrorException`