AnomalyDetectorClient.DetectUnivariateChangePoint メソッド

定義

オーバーロード

DetectUnivariateChangePoint(UnivariateChangePointDetectionOptions, CancellationToken)

系列全体の変更ポイントを検出します。

DetectUnivariateChangePoint(RequestContent, RequestContext)

[プロトコルメソッド]系列全体の変更ポイントを検出する

DetectUnivariateChangePoint(UnivariateChangePointDetectionOptions, CancellationToken)

Source:
AnomalyDetectorClient.cs

系列全体の変更ポイントを検出します。

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)

パラメーター

options
UnivariateChangePointDetectionOptions

一変量異常検出の方法。

cancellationToken
CancellationToken

使用する取り消しトークン。

戻り値

例外

options が null です。

このサンプルでは、必要なパラメーターを使用して DetectUnivariateChangePoint を呼び出す方法を示します。

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);

注釈

すべての系列ポイントの変更ポイント スコアを評価します。

適用対象

DetectUnivariateChangePoint(RequestContent, RequestContext)

Source:
AnomalyDetectorClient.cs

[プロトコルメソッド]系列全体の変更ポイントを検出する

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

パラメーター

content
RequestContent

要求の本文として送信するコンテンツ。

context
RequestContext

要求コンテキスト。これは、呼び出しごとにクライアント パイプラインの既定の動作をオーバーライドできます。

戻り値

サービスから返された応答。

例外

content が null です。

サービスから成功以外の状態コードが返されました。

このサンプルでは、必要な要求コンテンツを使用して DetectUnivariateChangePoint を呼び出す方法と、結果を解析する方法を示します。

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());

このサンプルでは、すべての要求コンテンツで DetectUnivariateChangePoint を呼び出す方法と、結果を解析する方法を示します。

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());

注釈

すべての系列ポイントの変更ポイント スコアを評価する

要求と応答のペイロードの JSON スキーマを次に示します。

要求本文:

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

応答本文:

UnivariateChangePointDetectionResultスキーマ:

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

適用対象