Freigeben über


AnomalyDetectorClient.GetMultivariateModelsAsync Methode

Definition

Überlädt

GetMultivariateModelsAsync(Nullable<Int32>, Nullable<Int32>, RequestContext)

[Protokollmethode] Auflisten von multivariaten Modellen

GetMultivariateModelsAsync(Nullable<Int32>, Nullable<Int32>, CancellationToken)

Listen Sie multivariate Modelle auf.

GetMultivariateModelsAsync(Nullable<Int32>, Nullable<Int32>, RequestContext)

Quelle:
AnomalyDetectorClient.cs

[Protokollmethode] Auflisten von multivariaten Modellen

public virtual Azure.AsyncPageable<BinaryData> GetMultivariateModelsAsync(int? skip, int? maxCount, Azure.RequestContext context);
abstract member GetMultivariateModelsAsync : Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetMultivariateModelsAsync : Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetMultivariateModelsAsync (skip As Nullable(Of Integer), maxCount As Nullable(Of Integer), context As RequestContext) As AsyncPageable(Of BinaryData)

Parameter

skip
Nullable<Int32>

Die Anzahl der zu überspringenden Ergebniselemente.

maxCount
Nullable<Int32>

Die Anzahl der zurückzugebenden Ergebniselemente.

context
RequestContext

Der Anforderungskontext, der das Standardverhalten der Clientpipeline pro Aufruf außer Kraft setzen kann.

Gibt zurück

Die AsyncPageable<T> aus dem Dienst, die eine Liste von BinaryData -Objekten enthält. Details zum Textschema für jedes Element in der Auflistung finden Sie unten im Abschnitt Hinweise.

Ausnahmen

Der Dienst hat einen nicht erfolgreichen status Code zurückgegeben.

Beispiele

In diesem Beispiel wird gezeigt, wie GetMultivariateModelsAsync mit den erforderlichen Parametern aufgerufen und das Ergebnis analysiert wird.

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

await foreach (var item in client.GetMultivariateModelsAsync(1234, 1234, new RequestContext()))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).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());
}

Hinweise

Auflisten von Modellen einer Ressource.

Unten sehen Sie das JSON-Schema für ein Element in der auslagerungsfähigen Antwort.

Antworttext:

Schema für Array:

{
  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: [ErrorResponse], # Optional.
    diagnosticsInfo: {
      modelState: {
        epochIds: [number], # Optional.
        trainLosses: [number], # Optional.
        validationLosses: [number], # Optional.
        latenciesInSeconds: [number], # Optional.
      }, # Optional.
      variableStates: [VariableState], # Optional.
    }, # Optional.
  }, # Optional.
}

Gilt für:

GetMultivariateModelsAsync(Nullable<Int32>, Nullable<Int32>, CancellationToken)

Quelle:
AnomalyDetectorClient.cs

Listen Sie multivariate Modelle auf.

public virtual Azure.AsyncPageable<Azure.AI.AnomalyDetector.AnomalyDetectionModel> GetMultivariateModelsAsync(int? skip = default, int? maxCount = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMultivariateModelsAsync : Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.AI.AnomalyDetector.AnomalyDetectionModel>
override this.GetMultivariateModelsAsync : Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.AI.AnomalyDetector.AnomalyDetectionModel>
Public Overridable Function GetMultivariateModelsAsync (Optional skip As Nullable(Of Integer) = Nothing, Optional maxCount As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of AnomalyDetectionModel)

Parameter

skip
Nullable<Int32>

Die Anzahl der zu überspringenden Ergebniselemente.

maxCount
Nullable<Int32>

Die Anzahl der zurückzugebenden Ergebniselemente.

cancellationToken
CancellationToken

Das zu verwendende Abbruchtoken.

Gibt zurück

Beispiele

In diesem Beispiel wird gezeigt, wie GetMultivariateModelsAsync mit den erforderlichen Parametern aufgerufen wird.

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

await foreach (var item in client.GetMultivariateModelsAsync(1234, 1234))
{
}

Hinweise

Auflisten von Modellen einer Ressource.

Gilt für: