Partager via


AnomalyDetectorClient.DetectUnivariateChangePointAsync Méthode

Définition

Surcharges

DetectUnivariateChangePointAsync(UnivariateChangePointDetectionOptions, CancellationToken)

Détectez le point de modification pour l’ensemble de la série.

DetectUnivariateChangePointAsync(RequestContent, RequestContext)

[Méthode de protocole] Détecter le point de modification pour l’ensemble de la série

DetectUnivariateChangePointAsync(UnivariateChangePointDetectionOptions, CancellationToken)

Source:
AnomalyDetectorClient.cs

Détectez le point de modification pour l’ensemble de la série.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.UnivariateChangePointDetectionResult>> DetectUnivariateChangePointAsync (Azure.AI.AnomalyDetector.UnivariateChangePointDetectionOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member DetectUnivariateChangePointAsync : Azure.AI.AnomalyDetector.UnivariateChangePointDetectionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.UnivariateChangePointDetectionResult>>
override this.DetectUnivariateChangePointAsync : Azure.AI.AnomalyDetector.UnivariateChangePointDetectionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.AnomalyDetector.UnivariateChangePointDetectionResult>>
Public Overridable Function DetectUnivariateChangePointAsync (options As UnivariateChangePointDetectionOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of UnivariateChangePointDetectionResult))

Paramètres

options
UnivariateChangePointDetectionOptions

Méthode de détection d’anomalie univariée.

cancellationToken
CancellationToken

Jeton d’annulation à utiliser.

Retours

Exceptions

options a la valeur null.

Exemples

Cet exemple montre comment appeler DetectUnivariateChangePointAsync avec les paramètres requis.

var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new AnomalyDetectorClient(endpoint, credential);

var options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] 
{
    new TimeSeriesPoint(3.14f)
{
        Timestamp = DateTimeOffset.UtcNow,
    }
}, TimeGranularity.Yearly)
{
    CustomInterval = 1234,
    Period = 1234,
    StableTrendWindow = 1234,
    Threshold = 3.14f,
};
var result = await client.DetectUnivariateChangePointAsync(options);

Remarques

Évaluez le score de point de modification de chaque point de série.

S’applique à

DetectUnivariateChangePointAsync(RequestContent, RequestContext)

Source:
AnomalyDetectorClient.cs

[Méthode de protocole] Détecter le point de modification pour l’ensemble de la série

public virtual System.Threading.Tasks.Task<Azure.Response> DetectUnivariateChangePointAsync (Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member DetectUnivariateChangePointAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.DetectUnivariateChangePointAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DetectUnivariateChangePointAsync (content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)

Paramètres

content
RequestContent

Contenu à envoyer en tant que corps de la demande.

context
RequestContext

Contexte de demande, qui peut remplacer les comportements par défaut du pipeline client par appel.

Retours

Réponse retournée par le service.

Exceptions

content a la valeur null.

Le service a retourné un code de status non réussi.

Exemples

Cet exemple montre comment appeler DetectUnivariateChangePointAsync avec le contenu de requête requis et comment analyser le résultat.

var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new AnomalyDetectorClient(endpoint, credential);

var data = new {
    series = new[] {
        new {
            value = 123.45f,
        }
    },
    granularity = "yearly",
};

Response response = await client.DetectUnivariateChangePointAsync(RequestContent.Create(data));

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

Cet exemple montre comment appeler DetectUnivariateChangePointAsync avec tout le contenu de la requête et comment analyser le résultat.

var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new AnomalyDetectorClient(endpoint, credential);

var data = new {
    series = new[] {
        new {
            timestamp = "2022-05-10T14:57:31.2311892-04:00",
            value = 123.45f,
        }
    },
    granularity = "yearly",
    customInterval = 1234,
    period = 1234,
    stableTrendWindow = 1234,
    threshold = 123.45f,
};

Response response = await client.DetectUnivariateChangePointAsync(RequestContent.Create(data), new RequestContext());

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("period").ToString());
Console.WriteLine(result.GetProperty("isChangePoint")[0].ToString());
Console.WriteLine(result.GetProperty("confidenceScores")[0].ToString());

Remarques

Évaluer le score de point de modification de chaque point de série

Vous trouverez ci-dessous le schéma JSON pour les charges utiles de demande et de réponse.

Corps de la demande :

Schéma pour UnivariateChangePointDetectionOptions:

{
  series: [
    {
      timestamp: string (date & time), # Optional.
      value: number, # Required.
    }
  ], # Required.
  granularity: "yearly" | "monthly" | "weekly" | "daily" | "hourly" | "minutely" | "secondly" | "microsecond" | "none", # Required.
  customInterval: number, # Optional.
  period: number, # Optional.
  stableTrendWindow: number, # Optional.
  threshold: number, # Optional.
}

Corps de réponse :

Schéma pour UnivariateChangePointDetectionResult:

{
  period: number, # Optional.
  isChangePoint: [boolean], # Optional.
  confidenceScores: [number], # Optional.
}

S’applique à