diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/AnomalyDetector.json index 3dee357851d0..a0305e1b1dd0 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/AnomalyDetector.json @@ -243,63 +243,6 @@ "x-nullable": false, "description": "Custom Interval is used to set non-standard time interval, for example, if the series is 5 minutes, request can be set as {\"granularity\":\"minutely\", \"customInterval\":5}." }, - "ImputeMode": { - "type": "string", - "description": "Define the impute method, can be one of auto, previous, linear, fixed, zero, notFill.", - "x-nullable": false, - "x-ms-enum": { - "name": "ImputeMode", - "modelAsString": false, - "values": [ - { - "value": "auto" - }, - { - "value": "previous" - }, - { - "value": "linear" - }, - { - "value": "fixed" - }, - { - "value": "zero" - }, - { - "value": "notFill" - } - ], - "enum": [ - "auto", - "previous", - "linear", - "fixed", - "zero", - "notFill" - ] - } - }, - "ImputeValue": { - "type": "number", - "format": "float", - "x-nullable": false, - "description": "Used when imputeMode set to \"fixed\", in this case, it will be used to impute the missing values." - }, - "ImputeSrtategy": { - "type": "object", - "required": [ - "imputeMode" - ], - "properties": { - "imputeMode": { - "$ref": "#/definitions/ImputeMode" - }, - "imputeValue": { - "$ref": "#/definitions/ImputeValue" - } - } - }, "DetectRequest": { "type": "object", "required": [ @@ -334,10 +277,6 @@ "type": "integer", "format": "int32", "description": "Optional argument, advanced model parameter, between 0-99, the lower the value is, the larger the margin value will be which means less anomalies will be accepted." - }, - "imputeStrategy": { - "description": "Used to specify how to deal with missing values in the input series, it's used when granularity is not \"none\"", - "$ref": "#/definitions/ImputeSrtategy" } } }, @@ -368,8 +307,7 @@ "isPositiveAnomaly", "lowerMargins", "period", - "upperMargins", - "severity" + "upperMargins" ], "properties": { "period": { @@ -427,15 +365,6 @@ "type": "boolean", "x-nullable": false } - }, - "severity": { - "type": "array", - "description": "The severity score for each input point. The larger the value is, the more sever the anomaly is. For normal points, the \"severity\" is always 0.", - "items": { - "type": "number", - "format": "float", - "x-nullable": false - } } } }, @@ -449,8 +378,7 @@ "lowerMargin", "period", "upperMargin", - "suggestedWindow", - "severity" + "suggestedWindow" ], "properties": { "period": { @@ -489,11 +417,6 @@ "isPositiveAnomaly": { "type": "boolean", "description": "Anomaly status in positive direction of the latest point. True means the latest point is an anomaly and its real value is larger than the expected one." - }, - "severity": { - "type": "number", - "format": "float", - "description": "The severity score of the lates point. The larger the value is, the more sever the anomaly is. For normal points, the \"severity\" is always 0." } } }, @@ -578,4 +501,4 @@ "x-ms-skip-url-encoding": true } } -} \ No newline at end of file +} diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/MultivariateAnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/MultivariateAnomalyDetector.json index eaee57a1cb31..9dd264c83f26 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/MultivariateAnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/MultivariateAnomalyDetector.json @@ -60,14 +60,14 @@ } } }, - "summary": "Train a Multivariate Anomaly Detection Model", + "summary": "Train a Multivariate Anomaly Detection Model", "operationId": "TrainMultivariateModel", "parameters": [ { - "name": "modelRequest", - "in": "body", + "name": "modelRequest", + "in": "body", "required": true, - "description": "Training request", + "description": "Training request", "schema": { "$ref": "#/definitions/ModelInfo" } @@ -76,7 +76,7 @@ "tags": [ "MultivariateAnomalyDetection" ], - "x-ms-examples": { + "x-ms-examples": { "Train Multivariate model": { "$ref": "./examples/TrainModel.json" } @@ -88,7 +88,7 @@ "parameters": [ { "name": "modelId", - "description": "Model identifier.", + "description": "Model identifier.", "format": "uuid", "in": "path", "required": true, @@ -110,13 +110,13 @@ } } }, - "summary": "Get Multivariate Model", + "summary": "Get Multivariate Model", "description": "Get detailed information of multivariate model, including the training status and variables used in the model.", "operationId": "GetMultivariateModel", "tags": [ "MultivariateAnomalyDetection" ], - "x-ms-examples": { + "x-ms-examples": { "Get multivariate model": { "$ref": "./examples/GetModel.json" } @@ -134,7 +134,7 @@ } } }, - "x-ms-examples": { + "x-ms-examples": { "Delete multivariate model": { "$ref": "./examples/DeleteModel.json" } @@ -151,9 +151,9 @@ "parameters": [ { "name": "modelId", - "description": "Model identifier.", + "description": "Model identifier.", "in": "path", - "format": "uuid", + "format": "uuid", "required": true, "type": "string" } @@ -176,18 +176,18 @@ } } }, - "summary": "Detect Multivariate Anomaly", + "summary": "Detect Multivariate Anomaly", "description": "Submit detection multivariate anomaly task with the trained model of modelId, the input schema should be the same with the training request. Thus request will be complete asynchronously and will return a resultId for querying the detection result.The request should be a source link to indicate an externally accessible Azure storage Uri (preferably a Shared Access Signature Uri). All time-series used in generate the model must be zipped into one single file. Each time-series will be as follows: the first column is timestamp and the second column is value.", "operationId": "DetectAnomaly", - "x-ms-examples": { + "x-ms-examples": { "Detect anomaly with multivariate Model": { "$ref": "./examples/DetectAnomaly.json" } }, "parameters": [ { - "name": "detectionRequest", - "description": "Detect anomaly request", + "name": "detectionRequest", + "description": "Detect anomaly request", "required": true, "in": "body", "schema": { @@ -200,15 +200,15 @@ ] } }, - "/multivariate/results/{resultId}": { + "/multivariate/results/{resultId}": { "parameters": [ { "name": "resultId", - "description": "Result identifier.", + "description": "Result identifier.", "in": "path", "required": true, "type": "string", - "format": "uuid" + "format": "uuid" } ], "get": { @@ -226,14 +226,14 @@ } } }, - "x-ms-examples": { + "x-ms-examples": { "Get detection result": { "$ref": "./examples/GetResult.json" } }, "summary": "Get Multivariate Anomaly Detection Result", "operationId": "GetDetectionResult", - "description": "Get multivariate anomaly detection result based on resultId returned by the DetectAnomalyAsync api", + "description": "Get multivariate anomaly detection result based on resultId returned by the DetectAnomalyAsync api", "tags": [ "MultivariateAnomalyDetection" ] @@ -243,11 +243,11 @@ "parameters": [ { "name": "modelId", - "description": "Model identifier.", + "description": "Model identifier.", "in": "path", "required": true, "type": "string", - "format": "uuid" + "format": "uuid" } ], "get": { @@ -259,8 +259,8 @@ "description": "application/zip", "type": "string" } - }, - "schema": { + }, + "schema": { "type": "object", "format": "file" } @@ -272,7 +272,7 @@ } } }, - "x-ms-examples": { + "x-ms-examples": { "Get detection result": { "$ref": "./examples/ExportModel.json" } @@ -779,19 +779,19 @@ "properties": { "modelId": { "type": "string", - "format": "uuid", - "description": "Model identifier.", + "format": "uuid", + "description": "Model identifier.", "example": "45aad126-aafd-11ea-b8fb-d89ef3400c5f" }, "createdTime": { "type": "string", - "format": "date-time", + "format": "date-time", "description": "Date and time (UTC) when the model was created.", "example": "2020-06-30T00:00:00Z" }, "lastUpdatedTime": { "type": "string", - "format": "date-time", + "format": "date-time", "description": "Date and time (UTC) when the model was last updated.", "example": "2020-06-30T00:00:00Z" }, @@ -827,7 +827,7 @@ "currentCount": { "type": "integer", "description": "Current count of trained multivariate models.", - "x-nullable": false, + "x-nullable": false, "example": 10 }, "lastUpdatedTime": { @@ -841,7 +841,7 @@ "DetectionRequest": { "required": [ "source", - "endTime", + "endTime", "startTime" ], "properties": { @@ -998,7 +998,7 @@ "properties": { "timestamp": { "type": "string", - "format": "date-time", + "format": "date-time", "description": "timestamp", "example": "2020-01-01T00:00:00Z" }, @@ -1018,7 +1018,6 @@ "AnomalyValue": { "required": [ "isAnomaly", - "score", "severity" ], "properties": { diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/examples/DetectAnomaly.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/examples/DetectAnomaly.json index b0bd2bf72516..105d392901b6 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/examples/DetectAnomaly.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/examples/DetectAnomaly.json @@ -3,305 +3,17 @@ "Endpoint": "{Endpoint}", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", - "body":{ - "variables": [ - { - "variableName": "Variable_1", - "timestamps": [ - "2021-01-01T00:00:00Z", - "2021-01-01T00:01:00Z", - "2021-01-01T00:02:00Z", - "2021-01-01T00:03:00Z", - "2021-01-01T00:04:00Z", - "2021-01-01T00:05:00Z", - "2021-01-01T00:06:00Z", - "2021-01-01T00:07:00Z", - "2021-01-01T00:08:00Z", - "2021-01-01T00:09:00Z", - "2021-01-01T00:10:00Z", - "2021-01-01T00:11:00Z", - "2021-01-01T00:12:00Z", - "2021-01-01T00:13:00Z", - "2021-01-01T00:14:00Z", - "2021-01-01T00:15:00Z", - "2021-01-01T00:16:00Z", - "2021-01-01T00:17:00Z", - "2021-01-01T00:18:00Z", - "2021-01-01T00:19:00Z", - "2021-01-01T00:20:00Z", - "2021-01-01T00:21:00Z", - "2021-01-01T00:22:00Z", - "2021-01-01T00:23:00Z", - "2021-01-01T00:24:00Z", - "2021-01-01T00:25:00Z", - "2021-01-01T00:26:00Z", - "2021-01-01T00:27:00Z", - "2021-01-01T00:28:00Z", - "2021-01-01T00:29:00Z" - ], - "values": [ - 0.4551378545933972, - 0.7388603950488748, - 0.201088255984052, - 0.7462812245891899, - 0.07308128850401663, - 0.33090474587393537, - 0.7544925268153315, - 0.987506336316328, - 0.6665932993421468, - 0.6308351543168672, - 0.08083310161466228, - 0.8414415588668442, - 0.514583545640453, - 0.0954489875193526, - 0.7786793231920507, - 0.41646133667960994, - 0.030176187583339287, - 0.3474214937189324, - 0.508530173413991, - 0.42451199127255046, - 0.2115944222725208, - 0.24733519545833516, - 0.8791022110982156, - 0.9479621899884665, - 0.26702703121252136, - 0.6954503497669413, - 0.1235728391488995, - 0.8214915473050647, - 0.11813002444192677, - 0.8579045951076123 - ] - }, - { - "variableName": "Variable_2", - "timestamps": [ - "2021-01-01T00:00:00Z", - "2021-01-01T00:01:00Z", - "2021-01-01T00:02:00Z", - "2021-01-01T00:03:00Z", - "2021-01-01T00:04:00Z", - "2021-01-01T00:05:00Z", - "2021-01-01T00:06:00Z", - "2021-01-01T00:07:00Z", - "2021-01-01T00:08:00Z", - "2021-01-01T00:09:00Z", - "2021-01-01T00:10:00Z", - "2021-01-01T00:11:00Z", - "2021-01-01T00:12:00Z", - "2021-01-01T00:13:00Z", - "2021-01-01T00:14:00Z", - "2021-01-01T00:15:00Z", - "2021-01-01T00:16:00Z", - "2021-01-01T00:17:00Z", - "2021-01-01T00:18:00Z", - "2021-01-01T00:19:00Z", - "2021-01-01T00:20:00Z", - "2021-01-01T00:21:00Z", - "2021-01-01T00:22:00Z", - "2021-01-01T00:23:00Z", - "2021-01-01T00:24:00Z", - "2021-01-01T00:25:00Z", - "2021-01-01T00:26:00Z", - "2021-01-01T00:27:00Z", - "2021-01-01T00:28:00Z", - "2021-01-01T00:29:00Z" - ], - "values": [ - 0.9617871613964145, - 0.24903311574778408, - 0.4920561254118613, - 0.9895601049618598, - 0.9171759283128094, - 0.5754204711105273, - 0.1811033296265634, - 0.8852311981742577, - 0.9543231904644779, - 0.7088012446094262, - 0.7843572237149014, - 0.7664787010700046, - 0.3699552325387093, - 0.504519908266789, - 0.5848930929950164, - 0.7628913396089576, - 0.8148405868900065, - 0.08540458873739332, - 0.03481976727525682, - 0.21275099339467762, - 0.9836175579199806, - 0.9321441483364282, - 0.038466608085469534, - 0.1723138437622782, - 0.8626383410218382, - 0.35053229974224254, - 0.631141662835182, - 0.0730352607990088, - 0.08886179043386, - 0.7488606040971179 - ] - }, - { - "variableName": "Variable_3", - "timestamps": [ - "2021-01-01T00:00:00Z", - "2021-01-01T00:01:00Z", - "2021-01-01T00:02:00Z", - "2021-01-01T00:03:00Z", - "2021-01-01T00:04:00Z", - "2021-01-01T00:05:00Z", - "2021-01-01T00:06:00Z", - "2021-01-01T00:07:00Z", - "2021-01-01T00:08:00Z", - "2021-01-01T00:09:00Z", - "2021-01-01T00:10:00Z", - "2021-01-01T00:11:00Z", - "2021-01-01T00:12:00Z", - "2021-01-01T00:13:00Z", - "2021-01-01T00:14:00Z", - "2021-01-01T00:15:00Z", - "2021-01-01T00:16:00Z", - "2021-01-01T00:17:00Z", - "2021-01-01T00:18:00Z", - "2021-01-01T00:19:00Z", - "2021-01-01T00:20:00Z", - "2021-01-01T00:21:00Z", - "2021-01-01T00:22:00Z", - "2021-01-01T00:23:00Z", - "2021-01-01T00:24:00Z", - "2021-01-01T00:25:00Z", - "2021-01-01T00:26:00Z", - "2021-01-01T00:27:00Z", - "2021-01-01T00:28:00Z", - "2021-01-01T00:29:00Z" - ], - "values": [ - 0.4030756879437628, - 0.15526889968448554, - 0.36352226408981103, - 0.6051200637229004, - 0.8516795018476276, - 0.2645605735279929, - 0.6810875830037345, - 0.9165894221681316, - 0.700783245230424, - 0.5624155469940331, - 0.6277289685127893, - 0.15992056539730204, - 0.6020964482827594, - 0.35937967753105915, - 0.8731686034848609, - 0.20301549117588935, - 0.029261872151168933, - 0.6261499548828445, - 0.45850782028563386, - 0.8275006940083313, - 0.032760268834037376, - 0.4485202784055029, - 0.8915691008748384, - 0.891669051517807, - 0.9469979353323046, - 0.115293087370132, - 0.08818772518459506, - 0.7426286620589166, - 0.32372247468990756, - 0.936268139507417 - ] - } - ], - "length": 2 + "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + "detectionRequest": { + "source": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.zip?sp=rl&st=2020-12-04T06:03:47Z&se=2022-12-05T06:03:00Z&sv=2019-12-12&sr=b&sig=AZTbvZ7fcp3MdqGY%2FvGHJXJjUgjS4DneCGl7U5omq5c%3D", + "startTime": "2019-04-01T00:15:00Z", + "endTime": "2019-04-01T00:40:00Z" } - }, "responses": { - "200": { - "body": { - "variableStates": [ - { - "variable": "variable_1", - "filledNARatio": 0, - "effectiveCount": 30, - "startTime": "2021-01-01T00:00:00Z", - "endTime": "2021-01-01T00:29:00Z", - "errors": [] - }, - { - "variable": "variable_2", - "filledNARatio": 0, - "effectiveCount": 30, - "startTime": "2021-01-01T00:00:00Z", - "endTime": "2021-01-01T00:29:00Z", - "errors": [] - }, - { - "variable": "variable_3", - "filledNARatio": 0, - "effectiveCount": 30, - "startTime": "2021-01-01T00:00:00Z", - "endTime": "2021-01-01T00:29:00Z", - "errors": [] - } - ], - "results": [ - { - "timestamp": "2021-01-01T00:28:00Z", - "value": { - "isAnomaly": false, - "severity": 0, - "score": 0.6928471326828003 - }, - "errors": [] - }, - { - "timestamp": "2021-01-01T00:29:00Z", - "value": { - "isAnomaly": true, - "severity": 0.5337404608726501, - "score": 0.9171165823936462, - "interpretation": { - "variables": [ - "variable_2", - "variable_3", - "variable_1" - ], - "contributorScores": [ - 53.71576215, - 33.24159383, - 13.04264402 - ], - "correlcationChanges": [ - { - "variables": [ - "variable_1", - "variable_3" - ], - "changes": [ - 0.1741322, - -0.1093203 - ] - }, - { - "variables": [ - "variable_2" - ], - "changes": [ - 0.1229392 - ] - }, - { - "variables": [], - "changes": [] - } - ] - } - }, - "errors": [] - } - ], - "errors": [ - { - "code": "string", - "message": "string" - } - ] + "201": { + "headers": { + "Location": "{Endpoint}/anomalydetector/v1.1-preview/multivariate/results/{resultId}" } } } diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/examples/DetectAnomalyJobs.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/examples/DetectAnomalyJobs.json deleted file mode 100644 index 105d392901b6..000000000000 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.1-preview/examples/DetectAnomalyJobs.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parameters": { - "Endpoint": "{Endpoint}", - "Content-Type": "application/json", - "Ocp-Apim-Subscription-Key": "{API key}", - "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", - "detectionRequest": { - "source": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.zip?sp=rl&st=2020-12-04T06:03:47Z&se=2022-12-05T06:03:00Z&sv=2019-12-12&sr=b&sig=AZTbvZ7fcp3MdqGY%2FvGHJXJjUgjS4DneCGl7U5omq5c%3D", - "startTime": "2019-04-01T00:15:00Z", - "endTime": "2019-04-01T00:40:00Z" - } - }, - "responses": { - "201": { - "headers": { - "Location": "{Endpoint}/anomalydetector/v1.1-preview/multivariate/results/{resultId}" - } - } - } -}