Compartilhar via


AnomalyDetectorClient.DetectUnivariateChangePoint Método

Definição

Sobrecargas

DetectUnivariateChangePoint(UnivariateChangePointDetectionOptions, CancellationToken)

Detecte o ponto de alteração para toda a série.

DetectUnivariateChangePoint(RequestContent, RequestContext)

[Método protocol] Detectar ponto de alteração para toda a série

DetectUnivariateChangePoint(UnivariateChangePointDetectionOptions, CancellationToken)

Origem:
AnomalyDetectorClient.cs

Detecte o ponto de alteração para toda a série.

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

Parâmetros

options
UnivariateChangePointDetectionOptions

Método de detecção de anomalias univariadas.

cancellationToken
CancellationToken

O token de cancelamento a ser usado.

Retornos

Exceções

options é nulo.

Exemplos

Este exemplo mostra como chamar DetectUnivariateChangePoint com os parâmetros necessários.

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 = client.DetectUnivariateChangePoint(options);

Comentários

Avalie a pontuação de ponto de alteração de cada ponto de série.

Aplica-se a

DetectUnivariateChangePoint(RequestContent, RequestContext)

Origem:
AnomalyDetectorClient.cs

[Método protocol] Detectar ponto de alteração para toda a série

public virtual Azure.Response DetectUnivariateChangePoint (Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member DetectUnivariateChangePoint : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.DetectUnivariateChangePoint : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function DetectUnivariateChangePoint (content As RequestContent, Optional context As RequestContext = Nothing) As Response

Parâmetros

content
RequestContent

O conteúdo a ser enviado como o corpo da solicitação.

context
RequestContext

O contexto de solicitação, que pode substituir os comportamentos padrão do pipeline do cliente por chamada.

Retornos

A resposta retornada do serviço.

Exceções

content é nulo.

O serviço retornou um código de status sem êxito.

Exemplos

Este exemplo mostra como chamar DetectUnivariateChangePoint com o conteúdo da solicitação necessário e como analisar o resultado.

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 = client.DetectUnivariateChangePoint(RequestContent.Create(data));

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

Este exemplo mostra como chamar DetectUnivariateChangePoint com todo o conteúdo da solicitação e como analisar o resultado.

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 = client.DetectUnivariateChangePoint(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());

Comentários

Avaliar a pontuação de ponto de alteração de cada ponto de série

Abaixo está o esquema JSON para as cargas de solicitação e resposta.

Corpo da solicitação:

Esquema para 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.
}

Corpo da resposta:

Esquema para UnivariateChangePointDetectionResult:

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

Aplica-se a