AnomalyDetectorClient.GetMultivariateModelsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetMultivariateModelsAsync(Nullable<Int32>, Nullable<Int32>, RequestContext) |
[Protocol Method] List Multivariate Models
|
GetMultivariateModelsAsync(Nullable<Int32>, Nullable<Int32>, CancellationToken) |
List Multivariate Models. |
GetMultivariateModelsAsync(Nullable<Int32>, Nullable<Int32>, RequestContext)
- Source:
- AnomalyDetectorClient.cs
[Protocol Method] List Multivariate Models
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetMultivariateModelsAsync(Nullable<Int32>, Nullable<Int32>, CancellationToken) convenience overload with strongly typed models first.
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)
Parameters
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The AsyncPageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.
Exceptions
Service returned a non-success status code.
Examples
This sample shows how to call GetMultivariateModelsAsync with required parameters and parse the result.
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());
}
Remarks
List models of a resource.
Below is the JSON schema for one item in the pageable response.
Response Body:
Schema for 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.
}
Applies to
GetMultivariateModelsAsync(Nullable<Int32>, Nullable<Int32>, CancellationToken)
- Source:
- AnomalyDetectorClient.cs
List Multivariate Models.
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)
Parameters
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Examples
This sample shows how to call GetMultivariateModelsAsync with required parameters.
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))
{
}
Remarks
List models of a resource.
Applies to
Azure SDK for .NET