AnomalyDetectorClient.GetMultivariateModel メソッド

定義

オーバーロード

GetMultivariateModel(String, CancellationToken)

多変量モデルを取得します。

GetMultivariateModel(String, RequestContext)

[プロトコルメソッド]多変量モデルを取得する

GetMultivariateModel(String, CancellationToken)

Source:
AnomalyDetectorClient.cs

多変量モデルを取得します。

public virtual Azure.Response<Azure.AI.AnomalyDetector.AnomalyDetectionModel> GetMultivariateModel (string modelId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMultivariateModel : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.AnomalyDetector.AnomalyDetectionModel>
override this.GetMultivariateModel : string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.AnomalyDetector.AnomalyDetectionModel>
Public Overridable Function GetMultivariateModel (modelId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnomalyDetectionModel)

パラメーター

modelId
String

モデル識別子。

cancellationToken
CancellationToken

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

戻り値

例外

modelId が null です。

modelId は空の文字列であり、空でないと想定されていました。

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

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

var result = client.GetMultivariateModel("<modelId>");

注釈

モデルで使用されるトレーニング状態や変数など、多変量モデルに関する詳細情報を取得します。

適用対象

GetMultivariateModel(String, RequestContext)

Source:
AnomalyDetectorClient.cs

[プロトコルメソッド]多変量モデルを取得する

public virtual Azure.Response GetMultivariateModel (string modelId, Azure.RequestContext context);
abstract member GetMultivariateModel : string * Azure.RequestContext -> Azure.Response
override this.GetMultivariateModel : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetMultivariateModel (modelId As String, context As RequestContext) As Response

パラメーター

modelId
String

モデル識別子。

context
RequestContext

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

戻り値

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

例外

modelId が null です。

modelId は空の文字列であり、空でないと想定されていました。

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

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

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

Response response = client.GetMultivariateModel("<modelId>", new RequestContext());

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("modelId").ToString());
Console.WriteLine(result.GetProperty("createdTime").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString());
Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString());

注釈

多変量モデルの詳細情報 (トレーニングの状態やモデルで使用された変数を含む) を取得します。

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

応答本文:

AnomalyDetectionModelスキーマ:

{
  modelId: string, # Required.
  createdTime: string (date & time), # Required.
  lastUpdatedTime: string (date & time), # Required.
  modelInfo: {
    dataSource: string, # Required.
    dataSchema: "OneTable" | "MultiTable", # Optional.
    startTime: string (date & time), # Required.
    endTime: string (date & time), # Required.
    displayName: string, # Optional.
    slidingWindow: number, # Optional.
    alignPolicy: {
      alignMode: "Inner" | "Outer", # Optional.
      fillNAMethod: "Previous" | "Subsequent" | "Linear" | "Zero" | "Fixed", # Optional.
      paddingValue: number, # Optional.
    }, # Optional.
    status: "CREATED" | "RUNNING" | "READY" | "FAILED", # Optional.
    errors: [
      {
        code: string, # Required.
        message: string, # Required.
      }
    ], # Optional.
    diagnosticsInfo: {
      modelState: {
        epochIds: [number], # Optional.
        trainLosses: [number], # Optional.
        validationLosses: [number], # Optional.
        latenciesInSeconds: [number], # Optional.
      }, # Optional.
      variableStates: [VariableState], # Optional.
    }, # Optional.
  }, # Optional.
}

適用対象