AnomalyDetectorClient.GetMultivariateModels 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
GetMultivariateModels(Nullable<Int32>, Nullable<Int32>, RequestContext) |
[Protocol Method] List Multivariate Models
|
GetMultivariateModels(Nullable<Int32>, Nullable<Int32>, CancellationToken) |
List Multivariate Models. |
GetMultivariateModels(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 GetMultivariateModels(Nullable<Int32>, Nullable<Int32>, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Pageable<BinaryData> GetMultivariateModels (int? skip, int? maxCount, Azure.RequestContext context);
abstract member GetMultivariateModels : Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetMultivariateModels : Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetMultivariateModels (skip As Nullable(Of Integer), maxCount As Nullable(Of Integer), context As RequestContext) As Pageable(Of BinaryData)
Parameters
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The Pageable<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 GetMultivariateModels 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);
foreach (var item in client.GetMultivariateModels(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
GetMultivariateModels(Nullable<Int32>, Nullable<Int32>, CancellationToken)
- Source:
- AnomalyDetectorClient.cs
List Multivariate Models.
public virtual Azure.Pageable<Azure.AI.AnomalyDetector.AnomalyDetectionModel> GetMultivariateModels (int? skip = default, int? maxCount = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMultivariateModels : Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.Pageable<Azure.AI.AnomalyDetector.AnomalyDetectionModel>
override this.GetMultivariateModels : Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.Pageable<Azure.AI.AnomalyDetector.AnomalyDetectionModel>
Public Overridable Function GetMultivariateModels (Optional skip As Nullable(Of Integer) = Nothing, Optional maxCount As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of AnomalyDetectionModel)
Parameters
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Examples
This sample shows how to call GetMultivariateModels with required parameters.
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new AnomalyDetectorClient(endpoint, credential);
foreach (var item in client.GetMultivariateModels(1234, 1234))
{
}
Remarks
List models of a resource.
Applies to
Azure SDK for .NET