你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AnomalyDetectorClient class
用于与 Azure 异常检测器 服务交互的客户端类。
- Extends
构造函数
Anomaly |
创建 AnomalyDetectorClient 的实例。 用法示例:
|
继承属性
api |
|
endpoint |
继承的方法
构造函数详细信息
AnomalyDetectorClient(string, TokenCredential | KeyCredential, PipelineOptions)
创建 AnomalyDetectorClient 的实例。
用法示例:
import { AnomalyDetectorClient, AzureKeyCredential } from "@azure/ai-anomaly-detector";
const client = new AnomalyDetectorClient(
"<service endpoint>",
new AzureKeyCredential("<api key>")
);
new AnomalyDetectorClient(endpointUrl: string, credential: TokenCredential | KeyCredential, options?: PipelineOptions)
参数
- endpointUrl
-
string
Azure 异常检测器服务终结点的 URL
- credential
用于对服务的请求进行身份验证。
- options
- PipelineOptions
用于配置 表单识别器 客户端。
继承属性详细信息
apiVersion
endpoint
继承的方法详细信息
deleteMultivariateModel(string, AnomalyDetectorDeleteMultivariateModelOptionalParams)
根据 modelId 删除现有多变量模型
function deleteMultivariateModel(modelId: string, options?: AnomalyDetectorDeleteMultivariateModelOptionalParams): Promise<RestResponse>
参数
- modelId
-
string
模型标识符。
选项参数。
返回
Promise<RestResponse>
detectAnomaly(string, DetectionRequest, AnomalyDetectorDetectAnomalyOptionalParams)
使用带 modelId 经过训练的模型提交多变量异常情况检测任务,输入架构应与训练请求相同。 这样一来,请求将异步完成并返回用于查询检测结果的 resultId。请求应为指示外部可访问的 Azure 存储 URI(最好是共享访问签名 URI)的源链接。 用于生成模型的所有时序都必须压缩为单个 zip 文件。 每个时序将采用以下格式:第一列是时间戳,第二列是值。
function detectAnomaly(modelId: string, body: DetectionRequest, options?: AnomalyDetectorDetectAnomalyOptionalParams): Promise<AnomalyDetectorDetectAnomalyResponse>
参数
- modelId
-
string
模型标识符。
- body
- DetectionRequest
检测异常请求
选项参数。
返回
Promise<AnomalyDetectorDetectAnomalyResponse>
detectChangePoint(DetectChangePointRequest, AnomalyDetectorDetectChangePointOptionalParams)
评估每个系列点的更改点分数
function detectChangePoint(body: DetectChangePointRequest, options?: AnomalyDetectorDetectChangePointOptionalParams): Promise<AnomalyDetectorDetectChangePointResponse>
参数
需要时序点和粒度。 如果需要,还可以在请求中设置高级模型参数。
选项参数。
返回
detectEntireSeries(DetectRequest, AnomalyDetectorDetectEntireSeriesOptionalParams)
此操作将生成一个具有整个序列的模型,每个点都使用相同的模型进行检测。 使用此方法时,特定点之前和之后的点将用于确定该特定点是否异常。 整个检测可以为用户提供时序的总体状态。
function detectEntireSeries(body: DetectRequest, options?: AnomalyDetectorDetectEntireSeriesOptionalParams): Promise<AnomalyDetectorDetectEntireSeriesResponse>
参数
- body
- DetectRequest
时序点和时间段(如果需要)。 还可以在请求中设置高级模型参数。
选项参数。
返回
detectLastPoint(DetectRequest, AnomalyDetectorDetectLastPointOptionalParams)
此操作使用最新点之前的点生成模型。 使用此方法时,只会使用历史点来确定目标点是否异常。 最新的点检测操作与实时监视业务指标的方案相匹配。
function detectLastPoint(body: DetectRequest, options?: AnomalyDetectorDetectLastPointOptionalParams): Promise<AnomalyDetectorDetectLastPointResponse>
参数
- body
- DetectRequest
时序点和时间段(如果需要)。 还可以在请求中设置高级模型参数。
选项参数。
返回
exportModel(string, AnomalyDetectorExportModelOptionalParams)
基于 modelId 导出多变量异常情况检测模型
function exportModel(modelId: string, options?: AnomalyDetectorExportModelOptionalParams): Promise<AnomalyDetectorExportModelResponse>
参数
- modelId
-
string
模型标识符。
选项参数。
返回
Promise<AnomalyDetectorExportModelResponse>
getDetectionResult(string, AnomalyDetectorGetDetectionResultOptionalParams)
根据 DetectAnomalyAsync API 返回的 resultId 获取多变量异常情况检测结果
function getDetectionResult(resultId: string, options?: AnomalyDetectorGetDetectionResultOptionalParams): Promise<AnomalyDetectorGetDetectionResultResponse>
参数
- resultId
-
string
结果标识符。
选项参数。
返回
getMultivariateModel(string, AnomalyDetectorGetMultivariateModelOptionalParams)
获取多变量模型的详细信息,包括训练状态和模型中使用的变量。
function getMultivariateModel(modelId: string, options?: AnomalyDetectorGetMultivariateModelOptionalParams): Promise<AnomalyDetectorGetMultivariateModelResponse>
参数
- modelId
-
string
模型标识符。
选项参数。
返回
lastDetectAnomaly(string, LastDetectionRequest, AnomalyDetectorLastDetectAnomalyOptionalParams)
用于异常检测的同步 API。
function lastDetectAnomaly(modelId: string, body: LastDetectionRequest, options?: AnomalyDetectorLastDetectAnomalyOptionalParams): Promise<AnomalyDetectorLastDetectAnomalyResponse>
参数
- modelId
-
string
模型标识符。
- body
- LastDetectionRequest
请求上次检测。
选项参数。
返回
listMultivariateModel(AnomalyDetectorListMultivariateModelOptionalParams)
列出订阅的模型
function listMultivariateModel(options?: AnomalyDetectorListMultivariateModelOptionalParams): PagedAsyncIterableIterator<AnomalyDetectorClientModelSnapshot, AnomalyDetectorClientModelSnapshot[], PageSettings>
参数
选项参数。
返回
sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)
发送使用提供的 OperationSpec 填充的 HTTP 请求。
function sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback<any>): Promise<RestResponse>
参数
- operationArguments
- OperationArguments
将从中填充 HTTP 请求的模板化值的参数。
- operationSpec
- OperationSpec
用于填充 httpRequest 的 OperationSpec。
- callback
-
ServiceCallback<any>
接收响应时要调用的回调。
返回
Promise<RestResponse>
sendRequest(RequestPrepareOptions | WebResourceLike)
发送提供的 httpRequest。
function sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise<HttpOperationResponse>
参数
- options
返回
Promise<HttpOperationResponse>
trainMultivariateModel(AnomalyDetectorClientModelInfo, AnomalyDetectorTrainMultivariateModelOptionalParams)
创建和训练多变量异常情况检测模型。 请求必须包含用于指示外部可访问的 Azure 存储 URI(最好是共享访问签名 URI)的源参数。 用于生成模型的所有时序都必须压缩为单个 zip 文件。 每个时序都将位于单个 CSV 文件中,其中第一列是时间戳,第二列是值。
function trainMultivariateModel(body: AnomalyDetectorClientModelInfo, options?: AnomalyDetectorTrainMultivariateModelOptionalParams): Promise<AnomalyDetectorTrainMultivariateModelResponse>
参数
培训请求
选项参数。
返回
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈