From df9d08d749cf3e94e042ccfe01e4fe752bad200b Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Tue, 19 Jan 2021 15:52:31 +0800 Subject: [PATCH 01/13] update contract for anomaly detector --- .../preview/v1.0/AnomalyDetector.json | 85 +++++++++++++++++-- .../preview/v1.0/examples/EntireDetect.json | 56 +++++++++++- .../preview/v1.0/examples/LastDetect.json | 7 +- 3 files changed, 141 insertions(+), 7 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json index 3c12b4188bed..05050f54e473 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json @@ -188,7 +188,7 @@ }, "TimeGranularity": { "type": "string", - "description": "Can only be one of yearly, monthly, weekly, daily, hourly, minutely or secondly. Granularity is used for verify whether input series is valid.", + "description": "Optional argument, can be one of yearly, monthly, weekly, daily, hourly, minutely, secondly or microsecond. If granularity is present in the request, it will be used to verify whether input series is valid and to impute missing values.", "x-nullable": false, "x-ms-enum": { "name": "TimeGranularity", @@ -226,9 +226,65 @@ "daily", "hourly", "minutely", - "secondly" + "secondly", + "microsecond" ] }, + "ImputeMode": { + "type": "string", + "description": "can be one of auto, previous, linear, fixed, zero or notFill.", + "x-nullable": false, + "x-ms-enum": { + "name": "TimeGranularity", + "modelAsString": false, + "values": [ + { + "value": "auto" + }, + { + "value": "previous" + }, + { + "value": "linear" + }, + { + "value": "fixed" + }, + { + "value": "zero" + }, + { + "value": "notFill" + } + ] + }, + "enum": [ + "auto", + "previous", + "linear", + "fixed", + "zero", + "notFill" + ] + }, + "ImputeStrategy": { + "type": "object", + "required": [ + "imputeMode" + ], + "properties": { + "imputeMode": { + "$ref": "#/definitions/ImputeMode", + "description": "The method that is used to impute missing values in the given time series." + }, + "imputeValue": { + "type": "number", + "format":"float", + "x-nullable": false, + "description": "Optional argument, if imputeMode is set to 'fixed', then this value is used to impute missing values." + } + } + }, "CustomInterval": { "type": "integer", "format": "int32", @@ -238,7 +294,6 @@ "DetectRequest": { "type": "object", "required": [ - "granularity", "series" ], "properties": { @@ -270,6 +325,10 @@ "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": { + "$ref":"#/definitions/ImputeStrategy", + "description": "Optional argument, indicates how to impute the missing values in the series." } } }, @@ -301,7 +360,8 @@ "isPositiveAnomaly", "lowerMargins", "period", - "upperMargins" + "upperMargins", + "severity" ], "properties": { "period": { @@ -359,6 +419,15 @@ "type": "boolean", "x-nullable": false } + }, + "severity": { + "type": "array", + "description": "Severity contains the severity score for each input point. For a normal point, the severity score is 0. For an anomaly point, the severity score is in (0, 1] that indicates the severity of the anomaly.", + "items": { + "type": "number", + "format": "float", + "x-nullable": false + } } } }, @@ -372,7 +441,8 @@ "lowerMargin", "period", "upperMargin", - "suggestedWindow" + "suggestedWindow", + "severity" ], "properties": { "period": { @@ -411,6 +481,11 @@ "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": "Severity score of the latest point. For a normal point, the severity score is 0. For an anomaly point, the severity score is in (0, 1] that indicates the severity of the anomaly." } } }, diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json index 648f4393922e..4d90f4ee5184 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json @@ -200,7 +200,11 @@ ], "maxAnomalyRatio": 0.25, "sensitivity": 95, - "granularity": "monthly" + "granularity": "monthly", + "imputeStrategy": { + "imputeMode": "fixed", + "imputeValue": 850 + } } }, "responses": { @@ -506,6 +510,56 @@ false, false, false + ], + "severity": [ + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.2906614447614368, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0, + 0.0 ] } } diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json index f6aee0843243..e574e107eded 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json @@ -200,7 +200,11 @@ ], "maxAnomalyRatio": 0.25, "sensitivity": 95, - "granularity": "monthly" + "granularity": "monthly", + "imputeStrategy": { + "imputeMode": "fixed", + "imputeValue": 850 + } } }, "responses": { @@ -213,6 +217,7 @@ "expectedValue": 809.23280846597038, "upperMargin": 40.461640423298519, "lowerMargin": 40.461640423298519, + "severity": 0.0, "suggestedWindow": 49 } } From 696a311885fb86370f02a61c7c5fa4f6681b63c7 Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Tue, 19 Jan 2021 19:24:34 +0800 Subject: [PATCH 02/13] make severity optional --- .../AnomalyDetector/preview/v1.0/AnomalyDetector.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json index 05050f54e473..d26eb5fff5dc 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json @@ -360,8 +360,7 @@ "isPositiveAnomaly", "lowerMargins", "period", - "upperMargins", - "severity" + "upperMargins" ], "properties": { "period": { @@ -441,8 +440,7 @@ "lowerMargin", "period", "upperMargin", - "suggestedWindow", - "severity" + "suggestedWindow" ], "properties": { "period": { From 6913db3e19213f206215b2d6707ac998bcb7f7b2 Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Wed, 20 Jan 2021 10:36:01 +0800 Subject: [PATCH 03/13] contract update --- .../AnomalyDetector/preview/v1.0/AnomalyDetector.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json index d26eb5fff5dc..cf1a38ddb0e1 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json @@ -235,7 +235,7 @@ "description": "can be one of auto, previous, linear, fixed, zero or notFill.", "x-nullable": false, "x-ms-enum": { - "name": "TimeGranularity", + "name": "ImputeMode", "modelAsString": false, "values": [ { @@ -335,14 +335,13 @@ "TimeSeriesPoint": { "type": "object", "required": [ - "timestamp", "value" ], "properties": { "timestamp": { "type": "string", "format": "date-time", - "description": "Timestamp of a data point (ISO8601 format)." + "description": "Optional argument, timestamp of a data point (ISO8601 format)." }, "value": { "type": "number", From a7fc832a0338c5f109bce2f8cbf4fab374ca3b47 Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Thu, 21 Jan 2021 11:37:37 +0800 Subject: [PATCH 04/13] update according to PR --- .../AnomalyDetector/preview/v1.0/AnomalyDetector.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json index cf1a38ddb0e1..1e354bec0408 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json @@ -232,7 +232,7 @@ }, "ImputeMode": { "type": "string", - "description": "can be one of auto, previous, linear, fixed, zero or notFill.", + "description": "Can be one of auto, previous, linear, fixed, zero or notFill.", "x-nullable": false, "x-ms-enum": { "name": "ImputeMode", @@ -420,6 +420,7 @@ }, "severity": { "type": "array", + "readOnly": true, "description": "Severity contains the severity score for each input point. For a normal point, the severity score is 0. For an anomaly point, the severity score is in (0, 1] that indicates the severity of the anomaly.", "items": { "type": "number", @@ -482,6 +483,7 @@ "severity": { "type": "number", "format": "float", + "readOnly": true, "description": "Severity score of the latest point. For a normal point, the severity score is 0. For an anomaly point, the severity score is in (0, 1] that indicates the severity of the anomaly." } } From 9d71cd0b2e8254e2c85786c07cc8941ec764612a Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Fri, 22 Jan 2021 11:15:47 +0800 Subject: [PATCH 05/13] update values --- .../preview/v1.0/AnomalyDetector.json | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json index 1e354bec0408..95db5f4d35da 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json @@ -216,6 +216,9 @@ { "name": "perSecond", "value": "secondly" + }, + { + "value": "microsecond" } ] }, @@ -365,56 +368,69 @@ "period": { "type": "integer", "format": "int32", + "readOnly": true, "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." }, "expectedValues": { "type": "array", + "readOnly": true, "description": "ExpectedValues contain expected value for each input point. The index of the array is consistent with the input series.", "items": { "type": "number", "format": "float", + "readOnly": true, "x-nullable": false } }, "upperMargins": { "type": "array", + "readOnly": true, "description": "UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series.", "items": { "type": "number", "format": "float", + "readOnly": true, "x-nullable": false } }, "lowerMargins": { "type": "array", + "readOnly": true, "description": "LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series.", "items": { "type": "number", "format": "float", + "readOnly": true, "x-nullable": false } }, "isAnomaly": { "type": "array", + "readOnly": true, "description": "IsAnomaly contains anomaly properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.", "items": { "type": "boolean", + "readOnly": true, "x-nullable": false } }, "isNegativeAnomaly": { "type": "array", + "readOnly": true, "description": "IsNegativeAnomaly contains anomaly status in negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series.", "items": { "type": "boolean", + "readOnly": true, "x-nullable": false } }, "isPositiveAnomaly": { "type": "array", + "readOnly": true, "description": "IsPositiveAnomaly contain anomaly status in positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series.", "items": { "type": "boolean", + "readOnly": true, "x-nullable": false } }, @@ -425,6 +441,7 @@ "items": { "type": "number", "format": "float", + "readOnly": true, "x-nullable": false } } @@ -432,52 +449,50 @@ }, "LastDetectResponse": { "type": "object", - "required": [ - "expectedValue", - "isAnomaly", - "isNegativeAnomaly", - "isPositiveAnomaly", - "lowerMargin", - "period", - "upperMargin", - "suggestedWindow" - ], "properties": { "period": { "type": "integer", "format": "int32", + "readOnly": true, "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." }, "suggestedWindow": { "type": "integer", "format": "int32", + "readOnly": true, "description": "Suggested input series points needed for detecting the latest point." }, "expectedValue": { "type": "number", "format": "float", + "readOnly": true, "description": "Expected value of the latest point." }, "upperMargin": { "type": "number", "format": "float", + "readOnly": true, "description": "Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as normal value. By adjusting marginScale value, anomaly status of latest point can be changed." }, "lowerMargin": { "type": "number", "format": "float", + "readOnly": true, "description": "Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. " }, "isAnomaly": { "type": "boolean", + "readOnly": true, "description": "Anomaly status of the latest point, true means the latest point is an anomaly either in negative direction or positive direction." }, "isNegativeAnomaly": { "type": "boolean", + "readOnly": true, "description": "Anomaly status in negative direction of the latest point. True means the latest point is an anomaly and its real value is smaller than the expected one." }, "isPositiveAnomaly": { "type": "boolean", + "readOnly": true, "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": { @@ -529,15 +544,11 @@ }, "ChangePointDetectResponse": { "type": "object", - "required": [ - "isChangePoint", - "confidenceScores", - "period" - ], "properties": { "period": { "type": "integer", "format": "int32", + "readOnly": true, "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." }, "isChangePoint": { @@ -545,6 +556,7 @@ "description": "isChangePoint contains change point properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.", "items": { "type": "boolean", + "readOnly": true, "x-nullable": false } }, @@ -554,6 +566,7 @@ "items": { "type": "number", "format": "float", + "readOnly": true, "x-nullable": false } } From 37f0a8c5af123effa1c1248f06861b9fa7d2041c Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Fri, 22 Jan 2021 22:40:14 +0800 Subject: [PATCH 06/13] update --- .../AnomalyDetector/preview/v1.0/AnomalyDetector.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json index 95db5f4d35da..cf00700a9936 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json @@ -355,15 +355,6 @@ }, "EntireDetectResponse": { "type": "object", - "required": [ - "expectedValues", - "isAnomaly", - "isNegativeAnomaly", - "isPositiveAnomaly", - "lowerMargins", - "period", - "upperMargins" - ], "properties": { "period": { "type": "integer", From ea9e4a6ac94801dad896a324ab3b41084c254295 Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Tue, 26 Jan 2021 11:54:59 +0800 Subject: [PATCH 07/13] prettier fix --- .../AnomalyDetector/preview/v1.0/AnomalyDetector.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json index cf00700a9936..f6c8f64ed5f7 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json @@ -282,7 +282,7 @@ }, "imputeValue": { "type": "number", - "format":"float", + "format": "float", "x-nullable": false, "description": "Optional argument, if imputeMode is set to 'fixed', then this value is used to impute missing values." } @@ -330,7 +330,7 @@ "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": { - "$ref":"#/definitions/ImputeStrategy", + "$ref": "#/definitions/ImputeStrategy", "description": "Optional argument, indicates how to impute the missing values in the series." } } From 2b8023e2c0087efae22bc6d0f9027bd1c1137a0f Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Fri, 5 Feb 2021 15:17:44 +0800 Subject: [PATCH 08/13] split the PR into two parts, this pr adds two enum values into the granularity and make timestamp optional --- .../preview/v1.0/AnomalyDetector.json | 120 ++++-------------- .../preview/v1.0/examples/EntireDetect.json | 56 +------- .../preview/v1.0/examples/LastDetect.json | 7 +- 3 files changed, 27 insertions(+), 156 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json index f6c8f64ed5f7..973bd0730e58 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json @@ -188,7 +188,7 @@ }, "TimeGranularity": { "type": "string", - "description": "Optional argument, can be one of yearly, monthly, weekly, daily, hourly, minutely, secondly or microsecond. If granularity is present in the request, it will be used to verify whether input series is valid and to impute missing values.", + "description": "Optional argument, can be one of yearly, monthly, weekly, daily, hourly, minutely, secondly, microsecond or none. If granularity is not present, it will be none by default. If granularity is none, the timestamp property in time series point can be absent.", "x-nullable": false, "x-ms-enum": { "name": "TimeGranularity", @@ -219,6 +219,9 @@ }, { "value": "microsecond" + }, + { + "value": "none" } ] }, @@ -230,64 +233,10 @@ "hourly", "minutely", "secondly", - "microsecond" - ] - }, - "ImputeMode": { - "type": "string", - "description": "Can be one of auto, previous, linear, fixed, zero or 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" + "microsecond", + "none" ] }, - "ImputeStrategy": { - "type": "object", - "required": [ - "imputeMode" - ], - "properties": { - "imputeMode": { - "$ref": "#/definitions/ImputeMode", - "description": "The method that is used to impute missing values in the given time series." - }, - "imputeValue": { - "type": "number", - "format": "float", - "x-nullable": false, - "description": "Optional argument, if imputeMode is set to 'fixed', then this value is used to impute missing values." - } - } - }, "CustomInterval": { "type": "integer", "format": "int32", @@ -355,84 +304,69 @@ }, "EntireDetectResponse": { "type": "object", + "required": [ + "expectedValues", + "isAnomaly", + "isNegativeAnomaly", + "isPositiveAnomaly", + "lowerMargins", + "period", + "upperMargins" + ], "properties": { "period": { "type": "integer", "format": "int32", - "readOnly": true, "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." }, "expectedValues": { "type": "array", - "readOnly": true, "description": "ExpectedValues contain expected value for each input point. The index of the array is consistent with the input series.", "items": { "type": "number", "format": "float", - "readOnly": true, "x-nullable": false } }, "upperMargins": { "type": "array", - "readOnly": true, "description": "UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series.", "items": { "type": "number", "format": "float", - "readOnly": true, "x-nullable": false } }, "lowerMargins": { "type": "array", - "readOnly": true, "description": "LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series.", "items": { "type": "number", "format": "float", - "readOnly": true, "x-nullable": false } }, "isAnomaly": { "type": "array", - "readOnly": true, "description": "IsAnomaly contains anomaly properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.", "items": { "type": "boolean", - "readOnly": true, "x-nullable": false } }, "isNegativeAnomaly": { "type": "array", - "readOnly": true, "description": "IsNegativeAnomaly contains anomaly status in negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series.", "items": { "type": "boolean", - "readOnly": true, "x-nullable": false } }, "isPositiveAnomaly": { "type": "array", - "readOnly": true, "description": "IsPositiveAnomaly contain anomaly status in positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series.", "items": { "type": "boolean", - "readOnly": true, - "x-nullable": false - } - }, - "severity": { - "type": "array", - "readOnly": true, - "description": "Severity contains the severity score for each input point. For a normal point, the severity score is 0. For an anomaly point, the severity score is in (0, 1] that indicates the severity of the anomaly.", - "items": { - "type": "number", - "format": "float", - "readOnly": true, "x-nullable": false } } @@ -440,57 +374,53 @@ }, "LastDetectResponse": { "type": "object", + "required": [ + "expectedValue", + "isAnomaly", + "isNegativeAnomaly", + "isPositiveAnomaly", + "lowerMargin", + "period", + "upperMargin", + "suggestedWindow" + ], "properties": { "period": { "type": "integer", "format": "int32", - "readOnly": true, "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." }, "suggestedWindow": { "type": "integer", "format": "int32", - "readOnly": true, "description": "Suggested input series points needed for detecting the latest point." }, "expectedValue": { "type": "number", "format": "float", - "readOnly": true, "description": "Expected value of the latest point." }, "upperMargin": { "type": "number", "format": "float", - "readOnly": true, "description": "Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as normal value. By adjusting marginScale value, anomaly status of latest point can be changed." }, "lowerMargin": { "type": "number", "format": "float", - "readOnly": true, "description": "Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. " }, "isAnomaly": { "type": "boolean", - "readOnly": true, "description": "Anomaly status of the latest point, true means the latest point is an anomaly either in negative direction or positive direction." }, "isNegativeAnomaly": { "type": "boolean", - "readOnly": true, "description": "Anomaly status in negative direction of the latest point. True means the latest point is an anomaly and its real value is smaller than the expected one." }, "isPositiveAnomaly": { "type": "boolean", - "readOnly": true, "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", - "readOnly": true, - "description": "Severity score of the latest point. For a normal point, the severity score is 0. For an anomaly point, the severity score is in (0, 1] that indicates the severity of the anomaly." } } }, diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json index 4d90f4ee5184..648f4393922e 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json @@ -200,11 +200,7 @@ ], "maxAnomalyRatio": 0.25, "sensitivity": 95, - "granularity": "monthly", - "imputeStrategy": { - "imputeMode": "fixed", - "imputeValue": 850 - } + "granularity": "monthly" } }, "responses": { @@ -510,56 +506,6 @@ false, false, false - ], - "severity": [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.2906614447614368, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 ] } } diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json index e574e107eded..f6aee0843243 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json @@ -200,11 +200,7 @@ ], "maxAnomalyRatio": 0.25, "sensitivity": 95, - "granularity": "monthly", - "imputeStrategy": { - "imputeMode": "fixed", - "imputeValue": 850 - } + "granularity": "monthly" } }, "responses": { @@ -217,7 +213,6 @@ "expectedValue": 809.23280846597038, "upperMargin": 40.461640423298519, "lowerMargin": 40.461640423298519, - "severity": 0.0, "suggestedWindow": 49 } } From bc8261bdafdc22997a9993f57a09708a747c6a51 Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Fri, 5 Feb 2021 17:49:12 +0800 Subject: [PATCH 09/13] change preview to stable --- .../preview/v1.0/AnomalyDetector.json | 508 ------ .../v1.0/examples/ChangePointDetect.json | 1569 ----------------- .../preview/v1.0/examples/EntireDetect.json | 513 ------ .../preview/v1.0/examples/LastDetect.json | 220 --- 4 files changed, 2810 deletions(-) delete mode 100644 specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json delete mode 100644 specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/ChangePointDetect.json delete mode 100644 specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json delete mode 100644 specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json deleted file mode 100644 index 973bd0730e58..000000000000 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "1.0", - "title": "Anomaly Detector Client", - "description": "The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis." - }, - "securityDefinitions": { - "apiKeyHeader": { - "type": "apiKey", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } - }, - "security": [ - { - "apiKeyHeader": [] - } - ], - "x-ms-parameterized-host": { - "hostTemplate": "{Endpoint}/anomalydetector/v1.0", - "useSchemePrefix": false, - "parameters": [ - { - "$ref": "#/parameters/Endpoint" - } - ] - }, - "paths": { - "/timeseries/entire/detect": { - "post": { - "summary": "Detect anomalies for the entire series in batch.", - "description": "This operation generates a model using an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.", - "operationId": "DetectEntireSeries", - "parameters": [ - { - "name": "body", - "in": "body", - "description": "Time series points and period if needed. Advanced model parameters can also be set in the request.", - "required": true, - "schema": { - "$ref": "#/definitions/DetectRequest" - } - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Successful operation.", - "schema": { - "$ref": "#/definitions/EntireDetectResponse" - } - }, - "default": { - "description": "Error response.", - "schema": { - "$ref": "#/definitions/AnomalyDetectorError" - } - } - }, - "x-ms-examples": { - "Find anomalies for the entire series in batch example": { - "$ref": "./examples/EntireDetect.json" - } - } - } - }, - "/timeseries/last/detect": { - "post": { - "summary": "Detect anomaly status of the latest point in time series.", - "description": "This operation generates a model using points before the latest one. With this method, only historical points are used to determine whether the target point is an anomaly. The latest point detecting operation matches the scenario of real-time monitoring of business metrics.", - "operationId": "DetectLastPoint", - "parameters": [ - { - "name": "body", - "in": "body", - "description": "Time series points and period if needed. Advanced model parameters can also be set in the request.", - "required": true, - "schema": { - "$ref": "#/definitions/DetectRequest" - } - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Successful operation.", - "schema": { - "$ref": "#/definitions/LastDetectResponse" - } - }, - "default": { - "description": "Error response.", - "schema": { - "$ref": "#/definitions/AnomalyDetectorError" - } - } - }, - "x-ms-examples": { - "Detect anomaly status of the latest point in time series example": { - "$ref": "./examples/LastDetect.json" - } - } - } - }, - "/timeseries/changepoint/detect": { - "post": { - "summary": "Detect change point for the entire series", - "description": "Evaluate change point score of every series point", - "operationId": "DetectChangePoint", - "parameters": [ - { - "name": "body", - "in": "body", - "description": "Time series points and granularity is needed. Advanced model parameters can also be set in the request if needed.", - "required": true, - "schema": { - "$ref": "#/definitions/ChangePointDetectRequest" - } - } - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Successful operation.", - "schema": { - "$ref": "#/definitions/ChangePointDetectResponse" - } - }, - "default": { - "description": "Error response.", - "schema": { - "$ref": "#/definitions/AnomalyDetectorError" - } - } - }, - "x-ms-examples": { - "Detect change point example": { - "$ref": "./examples/ChangePointDetect.json" - } - } - } - } - }, - "definitions": { - "AnomalyDetectorError": { - "type": "object", - "description": "Error information returned by the API.", - "properties": { - "code": { - "description": "The error code.", - "enum": [ - "InvalidCustomInterval", - "BadArgument", - "InvalidGranularity", - "InvalidPeriod", - "InvalidModelArgument", - "InvalidSeries", - "InvalidJsonFormat", - "RequiredGranularity", - "RequiredSeries" - ], - "x-ms-enum": { - "name": "AnomalyDetectorErrorCodes", - "modelAsString": true - } - }, - "message": { - "description": "A message explaining the error reported by the service.", - "type": "string" - } - } - }, - "TimeGranularity": { - "type": "string", - "description": "Optional argument, can be one of yearly, monthly, weekly, daily, hourly, minutely, secondly, microsecond or none. If granularity is not present, it will be none by default. If granularity is none, the timestamp property in time series point can be absent.", - "x-nullable": false, - "x-ms-enum": { - "name": "TimeGranularity", - "modelAsString": false, - "values": [ - { - "value": "yearly" - }, - { - "value": "monthly" - }, - { - "value": "weekly" - }, - { - "value": "daily" - }, - { - "value": "hourly" - }, - { - "name": "perMinute", - "value": "minutely" - }, - { - "name": "perSecond", - "value": "secondly" - }, - { - "value": "microsecond" - }, - { - "value": "none" - } - ] - }, - "enum": [ - "yearly", - "monthly", - "weekly", - "daily", - "hourly", - "minutely", - "secondly", - "microsecond", - "none" - ] - }, - "CustomInterval": { - "type": "integer", - "format": "int32", - "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}." - }, - "DetectRequest": { - "type": "object", - "required": [ - "series" - ], - "properties": { - "series": { - "type": "array", - "description": "Time series data points. Points should be sorted by timestamp in ascending order to match the anomaly detection result. If the data is not sorted correctly or there is duplicated timestamp, the API will not work. In such case, an error message will be returned.", - "items": { - "$ref": "#/definitions/TimeSeriesPoint" - } - }, - "granularity": { - "$ref": "#/definitions/TimeGranularity" - }, - "customInterval": { - "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}.", - "$ref": "#/definitions/CustomInterval" - }, - "period": { - "type": "integer", - "format": "int32", - "description": "Optional argument, periodic value of a time series. If the value is null or does not present, the API will determine the period automatically." - }, - "maxAnomalyRatio": { - "type": "number", - "format": "float", - "description": "Optional argument, advanced model parameter, max anomaly ratio in a time series." - }, - "sensitivity": { - "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": { - "$ref": "#/definitions/ImputeStrategy", - "description": "Optional argument, indicates how to impute the missing values in the series." - } - } - }, - "TimeSeriesPoint": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "description": "Optional argument, timestamp of a data point (ISO8601 format)." - }, - "value": { - "type": "number", - "format": "float", - "description": "The measurement of that point, should be float." - } - } - }, - "EntireDetectResponse": { - "type": "object", - "required": [ - "expectedValues", - "isAnomaly", - "isNegativeAnomaly", - "isPositiveAnomaly", - "lowerMargins", - "period", - "upperMargins" - ], - "properties": { - "period": { - "type": "integer", - "format": "int32", - "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." - }, - "expectedValues": { - "type": "array", - "description": "ExpectedValues contain expected value for each input point. The index of the array is consistent with the input series.", - "items": { - "type": "number", - "format": "float", - "x-nullable": false - } - }, - "upperMargins": { - "type": "array", - "description": "UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series.", - "items": { - "type": "number", - "format": "float", - "x-nullable": false - } - }, - "lowerMargins": { - "type": "array", - "description": "LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series.", - "items": { - "type": "number", - "format": "float", - "x-nullable": false - } - }, - "isAnomaly": { - "type": "array", - "description": "IsAnomaly contains anomaly properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.", - "items": { - "type": "boolean", - "x-nullable": false - } - }, - "isNegativeAnomaly": { - "type": "array", - "description": "IsNegativeAnomaly contains anomaly status in negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series.", - "items": { - "type": "boolean", - "x-nullable": false - } - }, - "isPositiveAnomaly": { - "type": "array", - "description": "IsPositiveAnomaly contain anomaly status in positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series.", - "items": { - "type": "boolean", - "x-nullable": false - } - } - } - }, - "LastDetectResponse": { - "type": "object", - "required": [ - "expectedValue", - "isAnomaly", - "isNegativeAnomaly", - "isPositiveAnomaly", - "lowerMargin", - "period", - "upperMargin", - "suggestedWindow" - ], - "properties": { - "period": { - "type": "integer", - "format": "int32", - "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." - }, - "suggestedWindow": { - "type": "integer", - "format": "int32", - "description": "Suggested input series points needed for detecting the latest point." - }, - "expectedValue": { - "type": "number", - "format": "float", - "description": "Expected value of the latest point." - }, - "upperMargin": { - "type": "number", - "format": "float", - "description": "Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as normal value. By adjusting marginScale value, anomaly status of latest point can be changed." - }, - "lowerMargin": { - "type": "number", - "format": "float", - "description": "Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. " - }, - "isAnomaly": { - "type": "boolean", - "description": "Anomaly status of the latest point, true means the latest point is an anomaly either in negative direction or positive direction." - }, - "isNegativeAnomaly": { - "type": "boolean", - "description": "Anomaly status in negative direction of the latest point. True means the latest point is an anomaly and its real value is smaller than the expected one." - }, - "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." - } - } - }, - "ChangePointDetectRequest": { - "type": "object", - "required": [ - "granularity", - "series" - ], - "properties": { - "series": { - "type": "array", - "description": "Time series data points. Points should be sorted by timestamp in ascending order to match the change point detection result.", - "items": { - "$ref": "#/definitions/TimeSeriesPoint" - } - }, - "granularity": { - "$ref": "#/definitions/TimeGranularity", - "description": "Can only be one of yearly, monthly, weekly, daily, hourly, minutely or secondly. Granularity is used for verify whether input series is valid." - }, - "customInterval": { - "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}.", - "$ref": "#/definitions/CustomInterval" - }, - "period": { - "type": "integer", - "format": "int32", - "description": "Optional argument, periodic value of a time series. If the value is null or does not present, the API will determine the period automatically." - }, - "stableTrendWindow": { - "type": "integer", - "format": "int32", - "description": "Optional argument, advanced model parameter, a default stableTrendWindow will be used in detection." - }, - "threshold": { - "type": "number", - "format": "float", - "description": "Optional argument, advanced model parameter, between 0.0-1.0, the lower the value is, the larger the trend error will be which means less change point will be accepted." - } - } - }, - "ChangePointDetectResponse": { - "type": "object", - "properties": { - "period": { - "type": "integer", - "format": "int32", - "readOnly": true, - "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." - }, - "isChangePoint": { - "type": "array", - "description": "isChangePoint contains change point properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.", - "items": { - "type": "boolean", - "readOnly": true, - "x-nullable": false - } - }, - "confidenceScores": { - "type": "array", - "description": "the change point confidence of each point", - "items": { - "type": "number", - "format": "float", - "readOnly": true, - "x-nullable": false - } - } - } - } - }, - "parameters": { - "Endpoint": { - "name": "Endpoint", - "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).", - "x-ms-parameter-location": "client", - "required": true, - "type": "string", - "in": "path", - "x-ms-skip-url-encoding": true - } - } -} diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/ChangePointDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/ChangePointDetect.json deleted file mode 100644 index e8866dadda32..000000000000 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/ChangePointDetect.json +++ /dev/null @@ -1,1569 +0,0 @@ -{ - "parameters": { - "Endpoint": "{Endpoint}", - "Content-Type": "application/json", - "Ocp-Apim-Subscription-Key": "{API key}", - "body": { - "series": [ - { - "timestamp": "2017-01-01T06:45:00Z", - "value": 1639196 - }, - { - "timestamp": "2017-01-01T06:50:00Z", - "value": 1639290 - }, - { - "timestamp": "2017-01-01T06:55:00Z", - "value": 1667293 - }, - { - "timestamp": "2017-01-01T07:00:00Z", - "value": 1703130 - }, - { - "timestamp": "2017-01-01T07:05:00Z", - "value": 1650912 - }, - { - "timestamp": "2017-01-01T07:10:00Z", - "value": 1653596 - }, - { - "timestamp": "2017-01-01T07:15:00Z", - "value": 1653793 - }, - { - "timestamp": "2017-01-01T07:20:00Z", - "value": 1653795 - }, - { - "timestamp": "2017-01-01T07:25:00Z", - "value": 1663471 - }, - { - "timestamp": "2017-01-01T07:30:00Z", - "value": 1662358 - }, - { - "timestamp": "2017-01-01T07:35:00Z", - "value": 1664320 - }, - { - "timestamp": "2017-01-01T07:40:00Z", - "value": 1664942 - }, - { - "timestamp": "2017-01-01T07:45:00Z", - "value": 1664966 - }, - { - "timestamp": "2017-01-01T07:50:00Z", - "value": 1724271 - }, - { - "timestamp": "2017-01-01T07:55:00Z", - "value": 1678720 - }, - { - "timestamp": "2017-01-01T08:00:00Z", - "value": 1672536 - }, - { - "timestamp": "2017-01-01T08:05:00Z", - "value": 1672544 - }, - { - "timestamp": "2017-01-01T08:10:00Z", - "value": 1672364 - }, - { - "timestamp": "2017-01-01T08:15:00Z", - "value": 1672912 - }, - { - "timestamp": "2017-01-01T08:20:00Z", - "value": 1672736 - }, - { - "timestamp": "2017-01-01T08:25:00Z", - "value": 1672725 - }, - { - "timestamp": "2017-01-01T08:30:00Z", - "value": 1673247 - }, - { - "timestamp": "2017-01-01T08:35:00Z", - "value": 1673109 - }, - { - "timestamp": "2017-01-01T08:40:00Z", - "value": 1690088 - }, - { - "timestamp": "2017-01-01T08:45:00Z", - "value": 1703865 - }, - { - "timestamp": "2017-01-01T08:50:00Z", - "value": 1703865 - }, - { - "timestamp": "2017-01-01T08:55:00Z", - "value": 1786581 - }, - { - "timestamp": "2017-01-01T09:00:00Z", - "value": 1800945 - }, - { - "timestamp": "2017-01-01T09:05:00Z", - "value": 1800957 - }, - { - "timestamp": "2017-01-01T09:10:00Z", - "value": 1801191 - }, - { - "timestamp": "2017-01-01T09:15:00Z", - "value": 1801412 - }, - { - "timestamp": "2017-01-01T09:20:00Z", - "value": 1801621 - }, - { - "timestamp": "2017-01-01T09:25:00Z", - "value": 1801621 - }, - { - "timestamp": "2017-01-01T09:30:00Z", - "value": 1801654 - }, - { - "timestamp": "2017-01-01T09:35:00Z", - "value": 1802105 - }, - { - "timestamp": "2017-01-01T09:40:00Z", - "value": 1801800 - }, - { - "timestamp": "2017-01-01T09:45:00Z", - "value": 1803040 - }, - { - "timestamp": "2017-01-01T09:50:00Z", - "value": 1803672 - }, - { - "timestamp": "2017-01-01T09:55:00Z", - "value": 1803535 - }, - { - "timestamp": "2017-01-01T10:00:00Z", - "value": 1803541 - }, - { - "timestamp": "2017-01-01T10:05:00Z", - "value": 1803545 - }, - { - "timestamp": "2017-01-01T10:10:00Z", - "value": 1803599 - }, - { - "timestamp": "2017-01-01T10:15:00Z", - "value": 1803616 - }, - { - "timestamp": "2017-01-01T10:20:00Z", - "value": 1803619 - }, - { - "timestamp": "2017-01-01T10:25:00Z", - "value": 1809942 - }, - { - "timestamp": "2017-01-01T10:30:00Z", - "value": 1802720 - }, - { - "timestamp": "2017-01-01T10:35:00Z", - "value": 1802720 - }, - { - "timestamp": "2017-01-01T10:40:00Z", - "value": 1802888 - }, - { - "timestamp": "2017-01-01T10:45:00Z", - "value": 1809574 - }, - { - "timestamp": "2017-01-01T10:50:00Z", - "value": 1803896 - }, - { - "timestamp": "2017-01-01T10:55:00Z", - "value": 1803850 - }, - { - "timestamp": "2017-01-01T11:00:00Z", - "value": 1803854 - }, - { - "timestamp": "2017-01-01T11:05:00Z", - "value": 1803854 - }, - { - "timestamp": "2017-01-01T11:10:00Z", - "value": 1803797 - }, - { - "timestamp": "2017-01-01T11:15:00Z", - "value": 1803921 - }, - { - "timestamp": "2017-01-01T11:20:00Z", - "value": 1803933 - }, - { - "timestamp": "2017-01-01T11:25:00Z", - "value": 1804040 - }, - { - "timestamp": "2017-01-01T11:30:00Z", - "value": 1804044 - }, - { - "timestamp": "2017-01-01T11:35:00Z", - "value": 1804070 - }, - { - "timestamp": "2017-01-01T11:40:00Z", - "value": 1804070 - }, - { - "timestamp": "2017-01-01T11:45:00Z", - "value": 1804068 - }, - { - "timestamp": "2017-01-01T11:50:00Z", - "value": 1804073 - }, - { - "timestamp": "2017-01-01T11:55:00Z", - "value": 1804101 - }, - { - "timestamp": "2017-01-01T12:00:00Z", - "value": 1804674 - }, - { - "timestamp": "2017-01-01T12:05:00Z", - "value": 1804714 - }, - { - "timestamp": "2017-01-01T12:10:00Z", - "value": 1804730 - }, - { - "timestamp": "2017-01-01T12:15:00Z", - "value": 1804816 - }, - { - "timestamp": "2017-01-01T12:20:00Z", - "value": 1803996 - }, - { - "timestamp": "2017-01-01T12:25:00Z", - "value": 1803998 - }, - { - "timestamp": "2017-01-01T12:30:00Z", - "value": 1804015 - }, - { - "timestamp": "2017-01-01T12:35:00Z", - "value": 1804047 - }, - { - "timestamp": "2017-01-01T12:40:00Z", - "value": 1804050 - }, - { - "timestamp": "2017-01-01T12:45:00Z", - "value": 1804218 - }, - { - "timestamp": "2017-01-01T12:50:00Z", - "value": 1804217 - }, - { - "timestamp": "2017-01-01T12:55:00Z", - "value": 1804217 - }, - { - "timestamp": "2017-01-01T13:00:00Z", - "value": 1804205 - }, - { - "timestamp": "2017-01-01T13:05:00Z", - "value": 1804728 - }, - { - "timestamp": "2017-01-01T13:10:00Z", - "value": 1804748 - }, - { - "timestamp": "2017-01-01T13:15:00Z", - "value": 1805232 - }, - { - "timestamp": "2017-01-01T13:20:00Z", - "value": 1814121 - }, - { - "timestamp": "2017-01-01T13:25:00Z", - "value": 1806789 - }, - { - "timestamp": "2017-01-01T13:30:00Z", - "value": 1806119 - }, - { - "timestamp": "2017-01-01T13:35:00Z", - "value": 1806329 - }, - { - "timestamp": "2017-01-01T13:40:00Z", - "value": 1806454 - }, - { - "timestamp": "2017-01-01T13:45:00Z", - "value": 1806852 - }, - { - "timestamp": "2017-01-01T13:50:00Z", - "value": 1807347 - }, - { - "timestamp": "2017-01-01T13:55:00Z", - "value": 1812144 - }, - { - "timestamp": "2017-01-01T14:00:00Z", - "value": 1807418 - }, - { - "timestamp": "2017-01-01T14:05:00Z", - "value": 1807418 - }, - { - "timestamp": "2017-01-01T14:10:00Z", - "value": 1807432 - }, - { - "timestamp": "2017-01-01T14:15:00Z", - "value": 1808540 - }, - { - "timestamp": "2017-01-01T14:20:00Z", - "value": 1808541 - }, - { - "timestamp": "2017-01-01T14:25:00Z", - "value": 1807831 - }, - { - "timestamp": "2017-01-01T14:30:00Z", - "value": 1807852 - }, - { - "timestamp": "2017-01-01T14:35:00Z", - "value": 1807811 - }, - { - "timestamp": "2017-01-01T14:40:00Z", - "value": 2214285 - }, - { - "timestamp": "2017-01-01T14:45:00Z", - "value": 2215019 - }, - { - "timestamp": "2017-01-01T14:50:00Z", - "value": 2215329 - }, - { - "timestamp": "2017-01-01T14:55:00Z", - "value": 2215097 - }, - { - "timestamp": "2017-01-01T15:00:00Z", - "value": 2215129 - }, - { - "timestamp": "2017-01-01T15:05:00Z", - "value": 2215120 - }, - { - "timestamp": "2017-01-01T15:10:00Z", - "value": 2217056 - }, - { - "timestamp": "2017-01-01T15:15:00Z", - "value": 2217056 - }, - { - "timestamp": "2017-01-01T15:20:00Z", - "value": 2222126 - }, - { - "timestamp": "2017-01-01T15:25:00Z", - "value": 2226472 - }, - { - "timestamp": "2017-01-01T15:30:00Z", - "value": 2226722 - }, - { - "timestamp": "2017-01-01T15:35:00Z", - "value": 2226729 - }, - { - "timestamp": "2017-01-01T15:40:00Z", - "value": 2226735 - }, - { - "timestamp": "2017-01-01T15:45:00Z", - "value": 2226735 - }, - { - "timestamp": "2017-01-01T15:50:00Z", - "value": 2226735 - }, - { - "timestamp": "2017-01-01T15:55:00Z", - "value": 2226952 - }, - { - "timestamp": "2017-01-01T16:00:00Z", - "value": 2226962 - }, - { - "timestamp": "2017-01-01T16:05:00Z", - "value": 2649337 - }, - { - "timestamp": "2017-01-01T16:10:00Z", - "value": 2092796 - }, - { - "timestamp": "2017-01-01T16:15:00Z", - "value": 2092839 - }, - { - "timestamp": "2017-01-01T16:20:00Z", - "value": 2092940 - }, - { - "timestamp": "2017-01-01T16:25:00Z", - "value": 2092940 - }, - { - "timestamp": "2017-01-01T16:30:00Z", - "value": 2092965 - }, - { - "timestamp": "2017-01-01T16:35:00Z", - "value": 2092979 - }, - { - "timestamp": "2017-01-01T16:40:00Z", - "value": 2095588 - }, - { - "timestamp": "2017-01-01T16:45:00Z", - "value": 2099586 - }, - { - "timestamp": "2017-01-01T16:50:00Z", - "value": 2102981 - }, - { - "timestamp": "2017-01-01T16:55:00Z", - "value": 2108053 - }, - { - "timestamp": "2017-01-01T17:00:00Z", - "value": 2107907 - }, - { - "timestamp": "2017-01-01T17:05:00Z", - "value": 2108241 - }, - { - "timestamp": "2017-01-01T17:10:00Z", - "value": 2100321 - }, - { - "timestamp": "2017-01-01T17:15:00Z", - "value": 2100448 - }, - { - "timestamp": "2017-01-01T17:20:00Z", - "value": 2100483 - }, - { - "timestamp": "2017-01-01T17:25:00Z", - "value": 2103042 - }, - { - "timestamp": "2017-01-01T17:30:00Z", - "value": 2103037 - }, - { - "timestamp": "2017-01-01T17:35:00Z", - "value": 2103040 - }, - { - "timestamp": "2017-01-01T17:40:00Z", - "value": 2103054 - }, - { - "timestamp": "2017-01-01T17:45:00Z", - "value": 2103058 - }, - { - "timestamp": "2017-01-01T17:50:00Z", - "value": 1830757 - }, - { - "timestamp": "2017-01-01T17:55:00Z", - "value": 1830855 - }, - { - "timestamp": "2017-01-01T18:00:00Z", - "value": 1831495 - }, - { - "timestamp": "2017-01-01T18:05:00Z", - "value": 1831463 - }, - { - "timestamp": "2017-01-01T18:10:00Z", - "value": 1831963 - }, - { - "timestamp": "2017-01-01T18:15:00Z", - "value": 1832046 - }, - { - "timestamp": "2017-01-01T18:20:00Z", - "value": 1832070 - }, - { - "timestamp": "2017-01-01T18:25:00Z", - "value": 1835511 - }, - { - "timestamp": "2017-01-01T18:30:00Z", - "value": 1835265 - }, - { - "timestamp": "2017-01-01T18:35:00Z", - "value": 1835481 - }, - { - "timestamp": "2017-01-01T18:40:00Z", - "value": 1835578 - }, - { - "timestamp": "2017-01-01T18:45:00Z", - "value": 1835611 - }, - { - "timestamp": "2017-01-01T18:50:00Z", - "value": 1836314 - }, - { - "timestamp": "2017-01-01T18:55:00Z", - "value": 1836369 - }, - { - "timestamp": "2017-01-01T19:00:00Z", - "value": 1837280 - }, - { - "timestamp": "2017-01-01T19:05:00Z", - "value": 1842939 - }, - { - "timestamp": "2017-01-01T19:10:00Z", - "value": 1843126 - }, - { - "timestamp": "2017-01-01T19:15:00Z", - "value": 1845840 - }, - { - "timestamp": "2017-01-01T19:20:00Z", - "value": 1842444 - }, - { - "timestamp": "2017-01-01T19:25:00Z", - "value": 1839891 - }, - { - "timestamp": "2017-01-01T19:30:00Z", - "value": 1839875 - }, - { - "timestamp": "2017-01-01T19:35:00Z", - "value": 1839870 - }, - { - "timestamp": "2017-01-01T19:40:00Z", - "value": 1840090 - }, - { - "timestamp": "2017-01-01T19:45:00Z", - "value": 1840479 - }, - { - "timestamp": "2017-01-01T19:50:00Z", - "value": 1840479 - }, - { - "timestamp": "2017-01-01T19:55:00Z", - "value": 1840482 - }, - { - "timestamp": "2017-01-01T20:00:00Z", - "value": 1841522 - }, - { - "timestamp": "2017-01-01T20:05:00Z", - "value": 1841836 - }, - { - "timestamp": "2017-01-01T20:10:00Z", - "value": 1842377 - }, - { - "timestamp": "2017-01-01T20:15:00Z", - "value": 1842388 - }, - { - "timestamp": "2017-01-01T20:20:00Z", - "value": 1842489 - }, - { - "timestamp": "2017-01-01T20:25:00Z", - "value": 1842489 - }, - { - "timestamp": "2017-01-01T20:30:00Z", - "value": 1842489 - }, - { - "timestamp": "2017-01-01T20:35:00Z", - "value": 1842496 - }, - { - "timestamp": "2017-01-01T20:40:00Z", - "value": 1842689 - }, - { - "timestamp": "2017-01-01T20:45:00Z", - "value": 1843117 - }, - { - "timestamp": "2017-01-01T20:50:00Z", - "value": 1843116 - }, - { - "timestamp": "2017-01-01T20:55:00Z", - "value": 1843227 - }, - { - "timestamp": "2017-01-01T21:00:00Z", - "value": 1843138 - }, - { - "timestamp": "2017-01-01T21:05:00Z", - "value": 1843141 - }, - { - "timestamp": "2017-01-01T21:10:00Z", - "value": 1843310 - }, - { - "timestamp": "2017-01-01T21:15:00Z", - "value": 1843310 - }, - { - "timestamp": "2017-01-01T21:20:00Z", - "value": 1843507 - }, - { - "timestamp": "2017-01-01T21:25:00Z", - "value": 1843953 - }, - { - "timestamp": "2017-01-01T21:30:00Z", - "value": 1844778 - }, - { - "timestamp": "2017-01-01T21:35:00Z", - "value": 1843918 - }, - { - "timestamp": "2017-01-01T21:40:00Z", - "value": 1882692 - }, - { - "timestamp": "2017-01-01T21:45:00Z", - "value": 1974888 - }, - { - "timestamp": "2017-01-01T21:50:00Z", - "value": 2157136 - }, - { - "timestamp": "2017-01-01T21:55:00Z", - "value": 2154987 - }, - { - "timestamp": "2017-01-01T22:00:00Z", - "value": 2155664 - }, - { - "timestamp": "2017-01-01T22:05:00Z", - "value": 2155660 - }, - { - "timestamp": "2017-01-01T22:10:00Z", - "value": 2155824 - }, - { - "timestamp": "2017-01-01T22:15:00Z", - "value": 2155824 - }, - { - "timestamp": "2017-01-01T22:20:00Z", - "value": 2156329 - }, - { - "timestamp": "2017-01-01T22:25:00Z", - "value": 2156479 - }, - { - "timestamp": "2017-01-01T22:30:00Z", - "value": 2165269 - }, - { - "timestamp": "2017-01-01T22:35:00Z", - "value": 2165433 - }, - { - "timestamp": "2017-01-01T22:40:00Z", - "value": 2165739 - }, - { - "timestamp": "2017-01-01T22:45:00Z", - "value": 2165931 - }, - { - "timestamp": "2017-01-01T22:50:00Z", - "value": 2165928 - }, - { - "timestamp": "2017-01-01T22:55:00Z", - "value": 2165989 - }, - { - "timestamp": "2017-01-01T23:00:00Z", - "value": 2228961 - }, - { - "timestamp": "2017-01-01T23:05:00Z", - "value": 2228961 - }, - { - "timestamp": "2017-01-01T23:10:00Z", - "value": 2228961 - }, - { - "timestamp": "2017-01-01T23:15:00Z", - "value": 2485802 - }, - { - "timestamp": "2017-01-01T23:20:00Z", - "value": 2485802 - }, - { - "timestamp": "2017-01-01T23:25:00Z", - "value": 2486021 - }, - { - "timestamp": "2017-01-01T23:30:00Z", - "value": 2485293 - }, - { - "timestamp": "2017-01-01T23:35:00Z", - "value": 2485293 - }, - { - "timestamp": "2017-01-01T23:40:00Z", - "value": 2485324 - }, - { - "timestamp": "2017-01-01T23:45:00Z", - "value": 2489142 - }, - { - "timestamp": "2017-01-01T23:50:00Z", - "value": 2526312 - }, - { - "timestamp": "2017-01-01T23:55:00Z", - "value": 2526313 - }, - { - "timestamp": "2017-01-02T00:00:00Z", - "value": 2526314 - }, - { - "timestamp": "2017-01-02T00:05:00Z", - "value": 2526324 - }, - { - "timestamp": "2017-01-02T00:10:00Z", - "value": 2526325 - }, - { - "timestamp": "2017-01-02T00:15:00Z", - "value": 2526205 - }, - { - "timestamp": "2017-01-02T00:20:00Z", - "value": 2526226 - }, - { - "timestamp": "2017-01-02T00:25:00Z", - "value": 2526475 - }, - { - "timestamp": "2017-01-02T00:30:00Z", - "value": 2526471 - }, - { - "timestamp": "2017-01-02T00:35:00Z", - "value": 2526471 - }, - { - "timestamp": "2017-01-02T00:40:00Z", - "value": 2526534 - }, - { - "timestamp": "2017-01-02T00:45:00Z", - "value": 2526646 - }, - { - "timestamp": "2017-01-02T00:50:00Z", - "value": 2526646 - }, - { - "timestamp": "2017-01-02T00:55:00Z", - "value": 2526648 - }, - { - "timestamp": "2017-01-02T01:00:00Z", - "value": 2526658 - }, - { - "timestamp": "2017-01-02T01:05:00Z", - "value": 2526771 - }, - { - "timestamp": "2017-01-02T01:10:00Z", - "value": 2526773 - }, - { - "timestamp": "2017-01-02T01:15:00Z", - "value": 2526793 - }, - { - "timestamp": "2017-01-02T01:20:00Z", - "value": 2527010 - }, - { - "timestamp": "2017-01-02T01:25:00Z", - "value": 2527031 - }, - { - "timestamp": "2017-01-02T01:30:00Z", - "value": 3178096 - }, - { - "timestamp": "2017-01-02T01:35:00Z", - "value": 3196305 - }, - { - "timestamp": "2017-01-02T01:40:00Z", - "value": 3196202 - }, - { - "timestamp": "2017-01-02T01:45:00Z", - "value": 3196202 - }, - { - "timestamp": "2017-01-02T01:50:00Z", - "value": 3196205 - }, - { - "timestamp": "2017-01-02T01:55:00Z", - "value": 3229232 - }, - { - "timestamp": "2017-01-02T02:00:00Z", - "value": 3230463 - }, - { - "timestamp": "2017-01-02T02:05:00Z", - "value": 3230468 - }, - { - "timestamp": "2017-01-02T02:10:00Z", - "value": 3230468 - }, - { - "timestamp": "2017-01-02T02:15:00Z", - "value": 3230468 - }, - { - "timestamp": "2017-01-02T02:20:00Z", - "value": 3230470 - }, - { - "timestamp": "2017-01-02T02:25:00Z", - "value": 3230467 - }, - { - "timestamp": "2017-01-02T02:30:00Z", - "value": 3230506 - }, - { - "timestamp": "2017-01-02T02:35:00Z", - "value": 3231536 - }, - { - "timestamp": "2017-01-02T02:40:00Z", - "value": 3230723 - }, - { - "timestamp": "2017-01-02T02:45:00Z", - "value": 3230727 - }, - { - "timestamp": "2017-01-02T02:50:00Z", - "value": 3230727 - }, - { - "timestamp": "2017-01-02T02:55:00Z", - "value": 3230727 - }, - { - "timestamp": "2017-01-02T03:00:00Z", - "value": 3231880 - }, - { - "timestamp": "2017-01-02T03:05:00Z", - "value": 3232283 - }, - { - "timestamp": "2017-01-02T03:10:00Z", - "value": 3232283 - }, - { - "timestamp": "2017-01-02T03:15:00Z", - "value": 3232283 - }, - { - "timestamp": "2017-01-02T03:20:00Z", - "value": 3232325 - }, - { - "timestamp": "2017-01-02T03:25:00Z", - "value": 3232323 - }, - { - "timestamp": "2017-01-02T03:30:00Z", - "value": 3232327 - }, - { - "timestamp": "2017-01-02T03:35:00Z", - "value": 3232340 - }, - { - "timestamp": "2017-01-02T03:40:00Z", - "value": 3232713 - }, - { - "timestamp": "2017-01-02T03:45:00Z", - "value": 3232729 - }, - { - "timestamp": "2017-01-02T03:50:00Z", - "value": 3232756 - }, - { - "timestamp": "2017-01-02T03:55:00Z", - "value": 3233500 - }, - { - "timestamp": "2017-01-02T04:00:00Z", - "value": 3233500 - }, - { - "timestamp": "2017-01-02T04:05:00Z", - "value": 3233500 - } - ], - "granularity": "minutely", - "customInterval": 5, - "stableTrendWindow": 10, - "threshold": 0.99, - "period": 0 - } - }, - "responses": { - "200": { - "body": { - "period": 0, - "confidenceScores": [ - 0.11841763735063232, - 0.014857199927548581, - 0.0887032374955278, - 0.07430314751946857, - 0.059903057543409355, - 0.04132288981790399, - 0.022742722092391268, - 0.0005683208474757854, - 0.0216060803974397, - 0.053248991089971616, - 0.08489190178249614, - 0.04322511558132514, - 0.085336620199234, - 0.05876047041512903, - 0.02673755265447302, - 0.005032027060762012, - 0.031323171543775764, - 0.06299774949197792, - 0.08944723025337244, - 0.11523169864554421, - 0.14288453512268834, - 0.001592562559717675, - 0.32637788222282893, - 0, - 7.37310752217245e-15, - 2.211932256651735e-14, - 1, - 0.015697015891758138, - 0.01242773215043403, - 0.016188579169534697, - 0.019537751864826272, - 0.022506917491993753, - 0.01885762668253081, - 0.016253355310429398, - 0.017227483829906676, - 0.023236706002118527, - 0.03906277743439327, - 0.0354134866249377, - 0.037084294769315296, - 0.038248426822850935, - 0.050274427573818385, - 0.046815140298421175, - 0.043292518511668716, - 0.041353259508804745, - 0.038242312045861385, - 0.0346880230034313, - 0.032717096744889713, - 0.033026212895129546, - 0.031055286636580585, - 0.0275326648498355, - 0.023883374040372555, - 0.021564107969369743, - 0.018706498551854727, - 0.01543721481052325, - 0.015176320358565887, - 0.011527029549110314, - 0.008004407762357859, - 0.004355116952902286, - 0.0007058261434393403, - 0.0030701336887340946, - 0.006592755475479178, - 0.010147044517909256, - 0.013701333560339335, - 0.016780613767597707, - 0.020366570065705403, - 0.024015860875168354, - 0.02757014991759106, - 0.03033275756808058, - 0.03068865378707081, - 0.03395793752839492, - 0.03760722833785786, - 0.04122485189164318, - 0.030433874112103007, - 0.032816474694461056, - 0.03602242392443729, - 0.03960838022253762, - 0.04268766042980336, - 0.04633695123926631, - 0.0346592903007527, - 0.010219725324164698, - 0.007218892441326965, - 0.006909776291079754, - 0.000049463551460760754, - 0.0016047901503119819, - 0.01042121060065547, - 0.009020294944303705, - 0.005371004134840759, - 0.0021650549048718984, - 0.010517653997227793, - 0.0075017083013172925, - 0.00385241749186172, - 0.0008681390516288423, - 0.019005920148370017, - 0.015388296594592068, - 0.12583612799160215, - 1, - 0.005055878353042495, - 0.007613932468790628, - 0.011913685646822731, - 0.0166567804043268, - 0.015351429327405014, - 0.034309821169245976, - 0.0292817211106433, - 0.02425362105202589, - 0.019225520993423218, - 0.01419742093482055, - 0.00916932087621788, - 0.004141220817600464, - 0.0008868792410022057, - 0.0059149792996048755, - 0.010943079358207547, - 0.015971179416810213, - 0.02099927947542763, - 1, - 0.11533376425564247, - 0.1207645081246342, - 0.025174230145423273, - 0.09422487163021387, - 0.08417070843230404, - 0.07411654523437947, - 0.06406238203646963, - 0.0540082188385598, - 0.04395405564064997, - 0.03500824639144218, - 0.024954083193532338, - 0.014899919995622513, - 0.004845756797712681, - 0.005208406400211895, - 0.015262569598121728, - 0.025316732796031558, - 0.03537089599394139, - 0.045425059191865964, - 0.05145748091871777, - 1, - 0.011663506282381296, - 0.0043856580970499884, - 0.002892190088273945, - 0.01017003827359788, - 0.01744788645892181, - 0.024725734644253115, - 0.03200358282957705, - 0.03928143101490098, - 0.046559279200224915, - 0.05383712738555622, - 0.060069956133518614, - 0.0450857235774741, - 0.050621872700536176, - 0.029050850963546225, - 0.045689493056171517, - 0.0385699811492357, - 0.03179880905474635, - 0.03082274474926925, - 0.03586345902254038, - 0.028585610837209074, - 0.021402764418918006, - 0.04705886213832124, - 0.049724532235770696, - 0.05957866937203304, - 0.052649160999162954, - 0.045371312813839014, - 0.03809346462851508, - 0.030815616443183775, - 0.023537768257859845, - 0.01945831289597576, - 0.012180464710644455, - 0.00490261652532052, - 0.002153560870260057, - 0.0033196287098028916, - 0.0029244412792105113, - 0.0043217396504358, - 0.010934575466529664, - 0.018117421884820732, - 0.02267188608187652, - 0.027321352045957807, - 0.03459920023128174, - 0.03563859904812146, - 0.02990120514994264, - 0.03607069938654979, - 0.017223061637835352, - 7.37310752217245e-15, - 1.47462150443449e-14, - 1, - 0.046440552438977135, - 0.012233652454378385, - 0.017033155644526038, - 0.05136672465183527, - 0.06970832954194527, - 0.09929181019761117, - 0.11281999222473732, - 0.11039622919405537, - 0.08125609011787617, - 0.05661270134791935, - 0.028264243663680723, - 0.005974323576610399, - 0.038471191754617544, - 0, - 0, - 0, - 0.020288532128574968, - 0.005041879493223223, - 0.009223088216122232, - 0.009332792637570532, - 0.024579445272937026, - 0.03289096891488949, - 0.050695883419617865, - 1, - 0.000748013913075547, - 0.002186373999917361, - 0.0009330173541465358, - 0.00032033929162428933, - 0.0012886906362965138, - 0.002542047282052593, - 0.0007963481454318109, - 0.0004886757560166365, - 0.0016470306347398486, - 0.001063686451208582, - 0.0011980222832366648, - 0.00008700161821178273, - 0.0013086910082902394, - 0.0022770423529624643, - 0.000016333637160404937, - 0.0012053557529180517, - 0.0018570345408140537, - 0.0037297360397815314, - 0.003109724507563151, - 0.22869458705263188, - 0.2293374323429407, - 0.1140021204394844, - 0.0012381896969537412, - 0.11340677603264777, - 1, - 0.011793249472519423, - 0.008293225072094536, - 0.00469819890465153, - 0.0010715054815308995, - 0.0025551879416044767, - 0.006118546853369862, - 0.008605219072110835, - 0.0053601180131874334, - 0.008860142413597574, - 0.01248683583673295, - 0.01611352925985358, - 0.005878587160222206, - 0.013145429690188892, - 0.022280640305150038, - 0.01865394688201466, - 0.015027253458894031, - 0.012033905149325846, - 0.009040556839742916, - 0.005445530672299909, - 0.0018505045048569009, - 0.001744521662600853, - 0.005339547830043862, - 0.008760404091259945, - 0.012181260352490777, - 0.009902010591734853, - 0.007622760830993676 - ], - "isChangePoint": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ] - } - } - } -} diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json deleted file mode 100644 index 648f4393922e..000000000000 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/EntireDetect.json +++ /dev/null @@ -1,513 +0,0 @@ -{ - "parameters": { - "Endpoint": "{Endpoint}", - "Content-Type": "application/json", - "Ocp-Apim-Subscription-Key": "{API key}", - "body": { - "series": [ - { - "timestamp": "1972-01-01T00:00:00Z", - "value": 826 - }, - { - "timestamp": "1972-02-01T00:00:00Z", - "value": 799 - }, - { - "timestamp": "1972-03-01T00:00:00Z", - "value": 890 - }, - { - "timestamp": "1972-04-01T00:00:00Z", - "value": 900 - }, - { - "timestamp": "1972-05-01T00:00:00Z", - "value": 961 - }, - { - "timestamp": "1972-06-01T00:00:00Z", - "value": 935 - }, - { - "timestamp": "1972-07-01T00:00:00Z", - "value": 894 - }, - { - "timestamp": "1972-08-01T00:00:00Z", - "value": 855 - }, - { - "timestamp": "1972-09-01T00:00:00Z", - "value": 809 - }, - { - "timestamp": "1972-10-01T00:00:00Z", - "value": 810 - }, - { - "timestamp": "1972-11-01T00:00:00Z", - "value": 766 - }, - { - "timestamp": "1972-12-01T00:00:00Z", - "value": 805 - }, - { - "timestamp": "1973-01-01T00:00:00Z", - "value": 821 - }, - { - "timestamp": "1973-02-01T00:00:00Z", - "value": 773 - }, - { - "timestamp": "1973-03-01T00:00:00Z", - "value": 883 - }, - { - "timestamp": "1973-04-01T00:00:00Z", - "value": 898 - }, - { - "timestamp": "1973-05-01T00:00:00Z", - "value": 957 - }, - { - "timestamp": "1973-06-01T00:00:00Z", - "value": 924 - }, - { - "timestamp": "1973-07-01T00:00:00Z", - "value": 881 - }, - { - "timestamp": "1973-08-01T00:00:00Z", - "value": 837 - }, - { - "timestamp": "1973-09-01T00:00:00Z", - "value": 784 - }, - { - "timestamp": "1973-10-01T00:00:00Z", - "value": 791 - }, - { - "timestamp": "1973-11-01T00:00:00Z", - "value": 760 - }, - { - "timestamp": "1973-12-01T00:00:00Z", - "value": 802 - }, - { - "timestamp": "1974-01-01T00:00:00Z", - "value": 828 - }, - { - "timestamp": "1974-02-01T00:00:00Z", - "value": 1030 - }, - { - "timestamp": "1974-03-01T00:00:00Z", - "value": 889 - }, - { - "timestamp": "1974-04-01T00:00:00Z", - "value": 902 - }, - { - "timestamp": "1974-05-01T00:00:00Z", - "value": 969 - }, - { - "timestamp": "1974-06-01T00:00:00Z", - "value": 947 - }, - { - "timestamp": "1974-07-01T00:00:00Z", - "value": 908 - }, - { - "timestamp": "1974-08-01T00:00:00Z", - "value": 867 - }, - { - "timestamp": "1974-09-01T00:00:00Z", - "value": 815 - }, - { - "timestamp": "1974-10-01T00:00:00Z", - "value": 812 - }, - { - "timestamp": "1974-11-01T00:00:00Z", - "value": 773 - }, - { - "timestamp": "1974-12-01T00:00:00Z", - "value": 813 - }, - { - "timestamp": "1975-01-01T00:00:00Z", - "value": 834 - }, - { - "timestamp": "1975-02-01T00:00:00Z", - "value": 782 - }, - { - "timestamp": "1975-03-01T00:00:00Z", - "value": 892 - }, - { - "timestamp": "1975-04-01T00:00:00Z", - "value": 903 - }, - { - "timestamp": "1975-05-01T00:00:00Z", - "value": 966 - }, - { - "timestamp": "1975-06-01T00:00:00Z", - "value": 937 - }, - { - "timestamp": "1975-07-01T00:00:00Z", - "value": 896 - }, - { - "timestamp": "1975-08-01T00:00:00Z", - "value": 858 - }, - { - "timestamp": "1975-09-01T00:00:00Z", - "value": 817 - }, - { - "timestamp": "1975-10-01T00:00:00Z", - "value": 827 - }, - { - "timestamp": "1975-11-01T00:00:00Z", - "value": 797 - }, - { - "timestamp": "1975-12-01T00:00:00Z", - "value": 843 - } - ], - "maxAnomalyRatio": 0.25, - "sensitivity": 95, - "granularity": "monthly" - } - }, - "responses": { - "200": { - "body": { - "isNegativeAnomaly": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "expectedValues": [ - 827.79409082439679, - 798.91337746719273, - 888.60584318071892, - 900.5606407986661, - 962.83894263783043, - 933.25916063069542, - 891.07841047996658, - 856.17816013636968, - 809.89872279089411, - 807.375129007505, - 764.31966824485175, - 803.933498594564, - 823.59006208830579, - 794.09056413342876, - 883.164245249282, - 894.84190006909535, - 956.84305911012575, - 927.62850551901136, - 885.812983784303, - 851.6424797402517, - 806.0927886943216, - 804.68268153120289, - 762.74070738882, - 804.0251702513732, - 825.35236625795585, - 798.04041887249764, - 889.30165055776979, - 902.4226124345937, - 965.867078532635, - 937.32004957366951, - 896.17205247111019, - 862.00873684136559, - 816.46623420974231, - 814.42977455247092, - 771.8614479159354, - 811.859271346729, - 831.89982792155206, - 802.947544797165, - 892.56844074350829, - 904.54882145338092, - 966.85270638447071, - 937.31683910030426, - 895.180003672544, - 860.36495963566347, - 814.17072859690427, - 811.9054862686213, - 769.10837696107421, - 809.23280846597038 - ], - "isPositiveAnomaly": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ], - "lowerMargins": [ - 41.389704541219835, - 39.945668873359637, - 44.430292159035943, - 45.028032039933308, - 48.14194713189152, - 46.662958031534771, - 44.553920523998329, - 42.808908006818484, - 40.494936139544706, - 40.368756450375251, - 38.215983412242586, - 40.196674929728196, - 41.179503104415289, - 39.704528206671441, - 44.1582122624641, - 44.742095003454772, - 47.842152955506293, - 46.381425275950569, - 44.290649189215145, - 42.582123987012579, - 40.30463943471608, - 40.234134076560146, - 38.137035369441, - 40.201258512568664, - 41.267618312897795, - 39.902020943624883, - 44.465082527888491, - 45.121130621729684, - 48.293353926631752, - 46.866002478683477, - 44.808602623555508, - 43.100436842068284, - 40.823311710487111, - 40.721488727623544, - 38.593072395796774, - 40.592963567336447, - 41.5949913960776, - 40.147377239858251, - 44.628422037175412, - 45.227441072669045, - 48.34263531922354, - 46.865841955015213, - 44.759000183627194, - 43.018247981783169, - 40.708536429845211, - 40.595274313431062, - 38.455418848053711, - 40.461640423298519 - ], - "period": 12, - "upperMargins": [ - 41.389704541219835, - 39.945668873359637, - 44.430292159035943, - 45.028032039933308, - 48.14194713189152, - 46.662958031534771, - 44.553920523998329, - 42.808908006818484, - 40.494936139544706, - 40.368756450375251, - 38.215983412242586, - 40.196674929728196, - 41.179503104415289, - 39.704528206671441, - 44.1582122624641, - 44.742095003454772, - 47.842152955506293, - 46.381425275950569, - 44.290649189215145, - 42.582123987012579, - 40.30463943471608, - 40.234134076560146, - 38.137035369441, - 40.201258512568664, - 41.267618312897795, - 39.902020943624883, - 44.465082527888491, - 45.121130621729684, - 48.293353926631752, - 46.866002478683477, - 44.808602623555508, - 43.100436842068284, - 40.823311710487111, - 40.721488727623544, - 38.593072395796774, - 40.592963567336447, - 41.5949913960776, - 40.147377239858251, - 44.628422037175412, - 45.227441072669045, - 48.34263531922354, - 46.865841955015213, - 44.759000183627194, - 43.018247981783169, - 40.708536429845211, - 40.595274313431062, - 38.455418848053711, - 40.461640423298519 - ], - "isAnomaly": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false - ] - } - } - } -} diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json deleted file mode 100644 index f6aee0843243..000000000000 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/examples/LastDetect.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "parameters": { - "Endpoint": "{Endpoint}", - "Content-Type": "application/json", - "Ocp-Apim-Subscription-Key": "{API key}", - "body": { - "series": [ - { - "timestamp": "1972-01-01T00:00:00Z", - "value": 826 - }, - { - "timestamp": "1972-02-01T00:00:00Z", - "value": 799 - }, - { - "timestamp": "1972-03-01T00:00:00Z", - "value": 890 - }, - { - "timestamp": "1972-04-01T00:00:00Z", - "value": 900 - }, - { - "timestamp": "1972-05-01T00:00:00Z", - "value": 961 - }, - { - "timestamp": "1972-06-01T00:00:00Z", - "value": 935 - }, - { - "timestamp": "1972-07-01T00:00:00Z", - "value": 894 - }, - { - "timestamp": "1972-08-01T00:00:00Z", - "value": 855 - }, - { - "timestamp": "1972-09-01T00:00:00Z", - "value": 809 - }, - { - "timestamp": "1972-10-01T00:00:00Z", - "value": 810 - }, - { - "timestamp": "1972-11-01T00:00:00Z", - "value": 766 - }, - { - "timestamp": "1972-12-01T00:00:00Z", - "value": 805 - }, - { - "timestamp": "1973-01-01T00:00:00Z", - "value": 821 - }, - { - "timestamp": "1973-02-01T00:00:00Z", - "value": 773 - }, - { - "timestamp": "1973-03-01T00:00:00Z", - "value": 883 - }, - { - "timestamp": "1973-04-01T00:00:00Z", - "value": 898 - }, - { - "timestamp": "1973-05-01T00:00:00Z", - "value": 957 - }, - { - "timestamp": "1973-06-01T00:00:00Z", - "value": 924 - }, - { - "timestamp": "1973-07-01T00:00:00Z", - "value": 881 - }, - { - "timestamp": "1973-08-01T00:00:00Z", - "value": 837 - }, - { - "timestamp": "1973-09-01T00:00:00Z", - "value": 784 - }, - { - "timestamp": "1973-10-01T00:00:00Z", - "value": 791 - }, - { - "timestamp": "1973-11-01T00:00:00Z", - "value": 760 - }, - { - "timestamp": "1973-12-01T00:00:00Z", - "value": 802 - }, - { - "timestamp": "1974-01-01T00:00:00Z", - "value": 828 - }, - { - "timestamp": "1974-02-01T00:00:00Z", - "value": 1030 - }, - { - "timestamp": "1974-03-01T00:00:00Z", - "value": 889 - }, - { - "timestamp": "1974-04-01T00:00:00Z", - "value": 902 - }, - { - "timestamp": "1974-05-01T00:00:00Z", - "value": 969 - }, - { - "timestamp": "1974-06-01T00:00:00Z", - "value": 947 - }, - { - "timestamp": "1974-07-01T00:00:00Z", - "value": 908 - }, - { - "timestamp": "1974-08-01T00:00:00Z", - "value": 867 - }, - { - "timestamp": "1974-09-01T00:00:00Z", - "value": 815 - }, - { - "timestamp": "1974-10-01T00:00:00Z", - "value": 812 - }, - { - "timestamp": "1974-11-01T00:00:00Z", - "value": 773 - }, - { - "timestamp": "1974-12-01T00:00:00Z", - "value": 813 - }, - { - "timestamp": "1975-01-01T00:00:00Z", - "value": 834 - }, - { - "timestamp": "1975-02-01T00:00:00Z", - "value": 782 - }, - { - "timestamp": "1975-03-01T00:00:00Z", - "value": 892 - }, - { - "timestamp": "1975-04-01T00:00:00Z", - "value": 903 - }, - { - "timestamp": "1975-05-01T00:00:00Z", - "value": 966 - }, - { - "timestamp": "1975-06-01T00:00:00Z", - "value": 937 - }, - { - "timestamp": "1975-07-01T00:00:00Z", - "value": 896 - }, - { - "timestamp": "1975-08-01T00:00:00Z", - "value": 858 - }, - { - "timestamp": "1975-09-01T00:00:00Z", - "value": 817 - }, - { - "timestamp": "1975-10-01T00:00:00Z", - "value": 827 - }, - { - "timestamp": "1975-11-01T00:00:00Z", - "value": 797 - }, - { - "timestamp": "1975-12-01T00:00:00Z", - "value": 843 - } - ], - "maxAnomalyRatio": 0.25, - "sensitivity": 95, - "granularity": "monthly" - } - }, - "responses": { - "200": { - "body": { - "isAnomaly": false, - "isPositiveAnomaly": false, - "isNegativeAnomaly": false, - "period": 12, - "expectedValue": 809.23280846597038, - "upperMargin": 40.461640423298519, - "lowerMargin": 40.461640423298519, - "suggestedWindow": 49 - } - } - } -} From 98e62a3c13d89b6b53f36bef3afe0a6e0638c594 Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Sun, 7 Feb 2021 11:47:37 +0800 Subject: [PATCH 10/13] update to stable version --- .../data-plane/AnomalyDetector/readme.go.md | 2 +- .../data-plane/AnomalyDetector/readme.md | 10 +- .../stable/v1.0/AnomalyDetector.json | 508 ++++++ .../v1.0/examples/ChangePointDetect.json | 1569 +++++++++++++++++ .../stable/v1.0/examples/EntireDetect.json | 513 ++++++ .../stable/v1.0/examples/LastDetect.json | 220 +++ 6 files changed, 2816 insertions(+), 6 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json create mode 100644 specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/ChangePointDetect.json create mode 100644 specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/EntireDetect.json create mode 100644 specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/LastDetect.json diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md index 1bc1a9c13a10..24b547cf519e 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md @@ -31,5 +31,5 @@ These settings apply only when `--tag=release_1_0 --go` is specified on the comm Please also specify `--go-sdk-folder=`. ``` yaml $(tag) == 'release_1_0' && $(go) -output-folder: $(go-sdk-folder)/services/preview/cognitiveservices/v1.0/$(namespace) +output-folder: $(go-sdk-folder)/services/stable/cognitiveservices/v1.0/$(namespace) ``` diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/readme.md b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.md index 585ec17fb952..b2cadf859aa1 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/readme.md +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.md @@ -19,7 +19,7 @@ openapi-type: data-plane These settings apply only when `--tag=release_1_0` is specified on the command line. ``` yaml $(tag) == 'release_1_0' -input-file: preview/v1.0/AnomalyDetector.json +input-file: stable/v1.0/AnomalyDetector.json ``` ## Swagger to SDK @@ -77,7 +77,7 @@ java: regenerate-manager: true ``` -## Multi-API/Profile support for AutoRest v3 generators +## Multi-API/Profile support for AutoRest v3 generators AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files. @@ -89,15 +89,15 @@ require: $(this-folder)/../../../../profiles/readme.md # all the input files across all versions input-file: - - $(this-folder)/preview/v1.0/AnomalyDetector.json + - $(this-folder)/stable/v1.0/AnomalyDetector.json ``` -If there are files that should not be in the `all-api-versions` set, +If there are files that should not be in the `all-api-versions` set, uncomment the `exclude-file` section below and add the file paths. ``` yaml $(tag) == 'all-api-versions' -#exclude-file: +#exclude-file: # - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json ``` diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json new file mode 100644 index 000000000000..973bd0730e58 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json @@ -0,0 +1,508 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0", + "title": "Anomaly Detector Client", + "description": "The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis." + }, + "securityDefinitions": { + "apiKeyHeader": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apiKeyHeader": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/anomalydetector/v1.0", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + }, + "paths": { + "/timeseries/entire/detect": { + "post": { + "summary": "Detect anomalies for the entire series in batch.", + "description": "This operation generates a model using an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.", + "operationId": "DetectEntireSeries", + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Time series points and period if needed. Advanced model parameters can also be set in the request.", + "required": true, + "schema": { + "$ref": "#/definitions/DetectRequest" + } + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Successful operation.", + "schema": { + "$ref": "#/definitions/EntireDetectResponse" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/AnomalyDetectorError" + } + } + }, + "x-ms-examples": { + "Find anomalies for the entire series in batch example": { + "$ref": "./examples/EntireDetect.json" + } + } + } + }, + "/timeseries/last/detect": { + "post": { + "summary": "Detect anomaly status of the latest point in time series.", + "description": "This operation generates a model using points before the latest one. With this method, only historical points are used to determine whether the target point is an anomaly. The latest point detecting operation matches the scenario of real-time monitoring of business metrics.", + "operationId": "DetectLastPoint", + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Time series points and period if needed. Advanced model parameters can also be set in the request.", + "required": true, + "schema": { + "$ref": "#/definitions/DetectRequest" + } + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Successful operation.", + "schema": { + "$ref": "#/definitions/LastDetectResponse" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/AnomalyDetectorError" + } + } + }, + "x-ms-examples": { + "Detect anomaly status of the latest point in time series example": { + "$ref": "./examples/LastDetect.json" + } + } + } + }, + "/timeseries/changepoint/detect": { + "post": { + "summary": "Detect change point for the entire series", + "description": "Evaluate change point score of every series point", + "operationId": "DetectChangePoint", + "parameters": [ + { + "name": "body", + "in": "body", + "description": "Time series points and granularity is needed. Advanced model parameters can also be set in the request if needed.", + "required": true, + "schema": { + "$ref": "#/definitions/ChangePointDetectRequest" + } + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "Successful operation.", + "schema": { + "$ref": "#/definitions/ChangePointDetectResponse" + } + }, + "default": { + "description": "Error response.", + "schema": { + "$ref": "#/definitions/AnomalyDetectorError" + } + } + }, + "x-ms-examples": { + "Detect change point example": { + "$ref": "./examples/ChangePointDetect.json" + } + } + } + } + }, + "definitions": { + "AnomalyDetectorError": { + "type": "object", + "description": "Error information returned by the API.", + "properties": { + "code": { + "description": "The error code.", + "enum": [ + "InvalidCustomInterval", + "BadArgument", + "InvalidGranularity", + "InvalidPeriod", + "InvalidModelArgument", + "InvalidSeries", + "InvalidJsonFormat", + "RequiredGranularity", + "RequiredSeries" + ], + "x-ms-enum": { + "name": "AnomalyDetectorErrorCodes", + "modelAsString": true + } + }, + "message": { + "description": "A message explaining the error reported by the service.", + "type": "string" + } + } + }, + "TimeGranularity": { + "type": "string", + "description": "Optional argument, can be one of yearly, monthly, weekly, daily, hourly, minutely, secondly, microsecond or none. If granularity is not present, it will be none by default. If granularity is none, the timestamp property in time series point can be absent.", + "x-nullable": false, + "x-ms-enum": { + "name": "TimeGranularity", + "modelAsString": false, + "values": [ + { + "value": "yearly" + }, + { + "value": "monthly" + }, + { + "value": "weekly" + }, + { + "value": "daily" + }, + { + "value": "hourly" + }, + { + "name": "perMinute", + "value": "minutely" + }, + { + "name": "perSecond", + "value": "secondly" + }, + { + "value": "microsecond" + }, + { + "value": "none" + } + ] + }, + "enum": [ + "yearly", + "monthly", + "weekly", + "daily", + "hourly", + "minutely", + "secondly", + "microsecond", + "none" + ] + }, + "CustomInterval": { + "type": "integer", + "format": "int32", + "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}." + }, + "DetectRequest": { + "type": "object", + "required": [ + "series" + ], + "properties": { + "series": { + "type": "array", + "description": "Time series data points. Points should be sorted by timestamp in ascending order to match the anomaly detection result. If the data is not sorted correctly or there is duplicated timestamp, the API will not work. In such case, an error message will be returned.", + "items": { + "$ref": "#/definitions/TimeSeriesPoint" + } + }, + "granularity": { + "$ref": "#/definitions/TimeGranularity" + }, + "customInterval": { + "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}.", + "$ref": "#/definitions/CustomInterval" + }, + "period": { + "type": "integer", + "format": "int32", + "description": "Optional argument, periodic value of a time series. If the value is null or does not present, the API will determine the period automatically." + }, + "maxAnomalyRatio": { + "type": "number", + "format": "float", + "description": "Optional argument, advanced model parameter, max anomaly ratio in a time series." + }, + "sensitivity": { + "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": { + "$ref": "#/definitions/ImputeStrategy", + "description": "Optional argument, indicates how to impute the missing values in the series." + } + } + }, + "TimeSeriesPoint": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Optional argument, timestamp of a data point (ISO8601 format)." + }, + "value": { + "type": "number", + "format": "float", + "description": "The measurement of that point, should be float." + } + } + }, + "EntireDetectResponse": { + "type": "object", + "required": [ + "expectedValues", + "isAnomaly", + "isNegativeAnomaly", + "isPositiveAnomaly", + "lowerMargins", + "period", + "upperMargins" + ], + "properties": { + "period": { + "type": "integer", + "format": "int32", + "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." + }, + "expectedValues": { + "type": "array", + "description": "ExpectedValues contain expected value for each input point. The index of the array is consistent with the input series.", + "items": { + "type": "number", + "format": "float", + "x-nullable": false + } + }, + "upperMargins": { + "type": "array", + "description": "UpperMargins contain upper margin of each input point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. Anomalies in response can be filtered by upperBoundary and lowerBoundary. By adjusting marginScale value, less significant anomalies can be filtered in client side. The index of the array is consistent with the input series.", + "items": { + "type": "number", + "format": "float", + "x-nullable": false + } + }, + "lowerMargins": { + "type": "array", + "description": "LowerMargins contain lower margin of each input point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. Points between the boundary can be marked as normal ones in client side. The index of the array is consistent with the input series.", + "items": { + "type": "number", + "format": "float", + "x-nullable": false + } + }, + "isAnomaly": { + "type": "array", + "description": "IsAnomaly contains anomaly properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.", + "items": { + "type": "boolean", + "x-nullable": false + } + }, + "isNegativeAnomaly": { + "type": "array", + "description": "IsNegativeAnomaly contains anomaly status in negative direction for each input point. True means a negative anomaly has been detected. A negative anomaly means the point is detected as an anomaly and its real value is smaller than the expected one. The index of the array is consistent with the input series.", + "items": { + "type": "boolean", + "x-nullable": false + } + }, + "isPositiveAnomaly": { + "type": "array", + "description": "IsPositiveAnomaly contain anomaly status in positive direction for each input point. True means a positive anomaly has been detected. A positive anomaly means the point is detected as an anomaly and its real value is larger than the expected one. The index of the array is consistent with the input series.", + "items": { + "type": "boolean", + "x-nullable": false + } + } + } + }, + "LastDetectResponse": { + "type": "object", + "required": [ + "expectedValue", + "isAnomaly", + "isNegativeAnomaly", + "isPositiveAnomaly", + "lowerMargin", + "period", + "upperMargin", + "suggestedWindow" + ], + "properties": { + "period": { + "type": "integer", + "format": "int32", + "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." + }, + "suggestedWindow": { + "type": "integer", + "format": "int32", + "description": "Suggested input series points needed for detecting the latest point." + }, + "expectedValue": { + "type": "number", + "format": "float", + "description": "Expected value of the latest point." + }, + "upperMargin": { + "type": "number", + "format": "float", + "description": "Upper margin of the latest point. UpperMargin is used to calculate upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. If the value of latest point is between upperBoundary and lowerBoundary, it should be treated as normal value. By adjusting marginScale value, anomaly status of latest point can be changed." + }, + "lowerMargin": { + "type": "number", + "format": "float", + "description": "Lower margin of the latest point. LowerMargin is used to calculate lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. " + }, + "isAnomaly": { + "type": "boolean", + "description": "Anomaly status of the latest point, true means the latest point is an anomaly either in negative direction or positive direction." + }, + "isNegativeAnomaly": { + "type": "boolean", + "description": "Anomaly status in negative direction of the latest point. True means the latest point is an anomaly and its real value is smaller than the expected one." + }, + "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." + } + } + }, + "ChangePointDetectRequest": { + "type": "object", + "required": [ + "granularity", + "series" + ], + "properties": { + "series": { + "type": "array", + "description": "Time series data points. Points should be sorted by timestamp in ascending order to match the change point detection result.", + "items": { + "$ref": "#/definitions/TimeSeriesPoint" + } + }, + "granularity": { + "$ref": "#/definitions/TimeGranularity", + "description": "Can only be one of yearly, monthly, weekly, daily, hourly, minutely or secondly. Granularity is used for verify whether input series is valid." + }, + "customInterval": { + "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}.", + "$ref": "#/definitions/CustomInterval" + }, + "period": { + "type": "integer", + "format": "int32", + "description": "Optional argument, periodic value of a time series. If the value is null or does not present, the API will determine the period automatically." + }, + "stableTrendWindow": { + "type": "integer", + "format": "int32", + "description": "Optional argument, advanced model parameter, a default stableTrendWindow will be used in detection." + }, + "threshold": { + "type": "number", + "format": "float", + "description": "Optional argument, advanced model parameter, between 0.0-1.0, the lower the value is, the larger the trend error will be which means less change point will be accepted." + } + } + }, + "ChangePointDetectResponse": { + "type": "object", + "properties": { + "period": { + "type": "integer", + "format": "int32", + "readOnly": true, + "description": "Frequency extracted from the series, zero means no recurrent pattern has been found." + }, + "isChangePoint": { + "type": "array", + "description": "isChangePoint contains change point properties for each input point. True means an anomaly either negative or positive has been detected. The index of the array is consistent with the input series.", + "items": { + "type": "boolean", + "readOnly": true, + "x-nullable": false + } + }, + "confidenceScores": { + "type": "array", + "description": "the change point confidence of each point", + "items": { + "type": "number", + "format": "float", + "readOnly": true, + "x-nullable": false + } + } + } + } + }, + "parameters": { + "Endpoint": { + "name": "Endpoint", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + } + } +} diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/ChangePointDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/ChangePointDetect.json new file mode 100644 index 000000000000..e8866dadda32 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/ChangePointDetect.json @@ -0,0 +1,1569 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "body": { + "series": [ + { + "timestamp": "2017-01-01T06:45:00Z", + "value": 1639196 + }, + { + "timestamp": "2017-01-01T06:50:00Z", + "value": 1639290 + }, + { + "timestamp": "2017-01-01T06:55:00Z", + "value": 1667293 + }, + { + "timestamp": "2017-01-01T07:00:00Z", + "value": 1703130 + }, + { + "timestamp": "2017-01-01T07:05:00Z", + "value": 1650912 + }, + { + "timestamp": "2017-01-01T07:10:00Z", + "value": 1653596 + }, + { + "timestamp": "2017-01-01T07:15:00Z", + "value": 1653793 + }, + { + "timestamp": "2017-01-01T07:20:00Z", + "value": 1653795 + }, + { + "timestamp": "2017-01-01T07:25:00Z", + "value": 1663471 + }, + { + "timestamp": "2017-01-01T07:30:00Z", + "value": 1662358 + }, + { + "timestamp": "2017-01-01T07:35:00Z", + "value": 1664320 + }, + { + "timestamp": "2017-01-01T07:40:00Z", + "value": 1664942 + }, + { + "timestamp": "2017-01-01T07:45:00Z", + "value": 1664966 + }, + { + "timestamp": "2017-01-01T07:50:00Z", + "value": 1724271 + }, + { + "timestamp": "2017-01-01T07:55:00Z", + "value": 1678720 + }, + { + "timestamp": "2017-01-01T08:00:00Z", + "value": 1672536 + }, + { + "timestamp": "2017-01-01T08:05:00Z", + "value": 1672544 + }, + { + "timestamp": "2017-01-01T08:10:00Z", + "value": 1672364 + }, + { + "timestamp": "2017-01-01T08:15:00Z", + "value": 1672912 + }, + { + "timestamp": "2017-01-01T08:20:00Z", + "value": 1672736 + }, + { + "timestamp": "2017-01-01T08:25:00Z", + "value": 1672725 + }, + { + "timestamp": "2017-01-01T08:30:00Z", + "value": 1673247 + }, + { + "timestamp": "2017-01-01T08:35:00Z", + "value": 1673109 + }, + { + "timestamp": "2017-01-01T08:40:00Z", + "value": 1690088 + }, + { + "timestamp": "2017-01-01T08:45:00Z", + "value": 1703865 + }, + { + "timestamp": "2017-01-01T08:50:00Z", + "value": 1703865 + }, + { + "timestamp": "2017-01-01T08:55:00Z", + "value": 1786581 + }, + { + "timestamp": "2017-01-01T09:00:00Z", + "value": 1800945 + }, + { + "timestamp": "2017-01-01T09:05:00Z", + "value": 1800957 + }, + { + "timestamp": "2017-01-01T09:10:00Z", + "value": 1801191 + }, + { + "timestamp": "2017-01-01T09:15:00Z", + "value": 1801412 + }, + { + "timestamp": "2017-01-01T09:20:00Z", + "value": 1801621 + }, + { + "timestamp": "2017-01-01T09:25:00Z", + "value": 1801621 + }, + { + "timestamp": "2017-01-01T09:30:00Z", + "value": 1801654 + }, + { + "timestamp": "2017-01-01T09:35:00Z", + "value": 1802105 + }, + { + "timestamp": "2017-01-01T09:40:00Z", + "value": 1801800 + }, + { + "timestamp": "2017-01-01T09:45:00Z", + "value": 1803040 + }, + { + "timestamp": "2017-01-01T09:50:00Z", + "value": 1803672 + }, + { + "timestamp": "2017-01-01T09:55:00Z", + "value": 1803535 + }, + { + "timestamp": "2017-01-01T10:00:00Z", + "value": 1803541 + }, + { + "timestamp": "2017-01-01T10:05:00Z", + "value": 1803545 + }, + { + "timestamp": "2017-01-01T10:10:00Z", + "value": 1803599 + }, + { + "timestamp": "2017-01-01T10:15:00Z", + "value": 1803616 + }, + { + "timestamp": "2017-01-01T10:20:00Z", + "value": 1803619 + }, + { + "timestamp": "2017-01-01T10:25:00Z", + "value": 1809942 + }, + { + "timestamp": "2017-01-01T10:30:00Z", + "value": 1802720 + }, + { + "timestamp": "2017-01-01T10:35:00Z", + "value": 1802720 + }, + { + "timestamp": "2017-01-01T10:40:00Z", + "value": 1802888 + }, + { + "timestamp": "2017-01-01T10:45:00Z", + "value": 1809574 + }, + { + "timestamp": "2017-01-01T10:50:00Z", + "value": 1803896 + }, + { + "timestamp": "2017-01-01T10:55:00Z", + "value": 1803850 + }, + { + "timestamp": "2017-01-01T11:00:00Z", + "value": 1803854 + }, + { + "timestamp": "2017-01-01T11:05:00Z", + "value": 1803854 + }, + { + "timestamp": "2017-01-01T11:10:00Z", + "value": 1803797 + }, + { + "timestamp": "2017-01-01T11:15:00Z", + "value": 1803921 + }, + { + "timestamp": "2017-01-01T11:20:00Z", + "value": 1803933 + }, + { + "timestamp": "2017-01-01T11:25:00Z", + "value": 1804040 + }, + { + "timestamp": "2017-01-01T11:30:00Z", + "value": 1804044 + }, + { + "timestamp": "2017-01-01T11:35:00Z", + "value": 1804070 + }, + { + "timestamp": "2017-01-01T11:40:00Z", + "value": 1804070 + }, + { + "timestamp": "2017-01-01T11:45:00Z", + "value": 1804068 + }, + { + "timestamp": "2017-01-01T11:50:00Z", + "value": 1804073 + }, + { + "timestamp": "2017-01-01T11:55:00Z", + "value": 1804101 + }, + { + "timestamp": "2017-01-01T12:00:00Z", + "value": 1804674 + }, + { + "timestamp": "2017-01-01T12:05:00Z", + "value": 1804714 + }, + { + "timestamp": "2017-01-01T12:10:00Z", + "value": 1804730 + }, + { + "timestamp": "2017-01-01T12:15:00Z", + "value": 1804816 + }, + { + "timestamp": "2017-01-01T12:20:00Z", + "value": 1803996 + }, + { + "timestamp": "2017-01-01T12:25:00Z", + "value": 1803998 + }, + { + "timestamp": "2017-01-01T12:30:00Z", + "value": 1804015 + }, + { + "timestamp": "2017-01-01T12:35:00Z", + "value": 1804047 + }, + { + "timestamp": "2017-01-01T12:40:00Z", + "value": 1804050 + }, + { + "timestamp": "2017-01-01T12:45:00Z", + "value": 1804218 + }, + { + "timestamp": "2017-01-01T12:50:00Z", + "value": 1804217 + }, + { + "timestamp": "2017-01-01T12:55:00Z", + "value": 1804217 + }, + { + "timestamp": "2017-01-01T13:00:00Z", + "value": 1804205 + }, + { + "timestamp": "2017-01-01T13:05:00Z", + "value": 1804728 + }, + { + "timestamp": "2017-01-01T13:10:00Z", + "value": 1804748 + }, + { + "timestamp": "2017-01-01T13:15:00Z", + "value": 1805232 + }, + { + "timestamp": "2017-01-01T13:20:00Z", + "value": 1814121 + }, + { + "timestamp": "2017-01-01T13:25:00Z", + "value": 1806789 + }, + { + "timestamp": "2017-01-01T13:30:00Z", + "value": 1806119 + }, + { + "timestamp": "2017-01-01T13:35:00Z", + "value": 1806329 + }, + { + "timestamp": "2017-01-01T13:40:00Z", + "value": 1806454 + }, + { + "timestamp": "2017-01-01T13:45:00Z", + "value": 1806852 + }, + { + "timestamp": "2017-01-01T13:50:00Z", + "value": 1807347 + }, + { + "timestamp": "2017-01-01T13:55:00Z", + "value": 1812144 + }, + { + "timestamp": "2017-01-01T14:00:00Z", + "value": 1807418 + }, + { + "timestamp": "2017-01-01T14:05:00Z", + "value": 1807418 + }, + { + "timestamp": "2017-01-01T14:10:00Z", + "value": 1807432 + }, + { + "timestamp": "2017-01-01T14:15:00Z", + "value": 1808540 + }, + { + "timestamp": "2017-01-01T14:20:00Z", + "value": 1808541 + }, + { + "timestamp": "2017-01-01T14:25:00Z", + "value": 1807831 + }, + { + "timestamp": "2017-01-01T14:30:00Z", + "value": 1807852 + }, + { + "timestamp": "2017-01-01T14:35:00Z", + "value": 1807811 + }, + { + "timestamp": "2017-01-01T14:40:00Z", + "value": 2214285 + }, + { + "timestamp": "2017-01-01T14:45:00Z", + "value": 2215019 + }, + { + "timestamp": "2017-01-01T14:50:00Z", + "value": 2215329 + }, + { + "timestamp": "2017-01-01T14:55:00Z", + "value": 2215097 + }, + { + "timestamp": "2017-01-01T15:00:00Z", + "value": 2215129 + }, + { + "timestamp": "2017-01-01T15:05:00Z", + "value": 2215120 + }, + { + "timestamp": "2017-01-01T15:10:00Z", + "value": 2217056 + }, + { + "timestamp": "2017-01-01T15:15:00Z", + "value": 2217056 + }, + { + "timestamp": "2017-01-01T15:20:00Z", + "value": 2222126 + }, + { + "timestamp": "2017-01-01T15:25:00Z", + "value": 2226472 + }, + { + "timestamp": "2017-01-01T15:30:00Z", + "value": 2226722 + }, + { + "timestamp": "2017-01-01T15:35:00Z", + "value": 2226729 + }, + { + "timestamp": "2017-01-01T15:40:00Z", + "value": 2226735 + }, + { + "timestamp": "2017-01-01T15:45:00Z", + "value": 2226735 + }, + { + "timestamp": "2017-01-01T15:50:00Z", + "value": 2226735 + }, + { + "timestamp": "2017-01-01T15:55:00Z", + "value": 2226952 + }, + { + "timestamp": "2017-01-01T16:00:00Z", + "value": 2226962 + }, + { + "timestamp": "2017-01-01T16:05:00Z", + "value": 2649337 + }, + { + "timestamp": "2017-01-01T16:10:00Z", + "value": 2092796 + }, + { + "timestamp": "2017-01-01T16:15:00Z", + "value": 2092839 + }, + { + "timestamp": "2017-01-01T16:20:00Z", + "value": 2092940 + }, + { + "timestamp": "2017-01-01T16:25:00Z", + "value": 2092940 + }, + { + "timestamp": "2017-01-01T16:30:00Z", + "value": 2092965 + }, + { + "timestamp": "2017-01-01T16:35:00Z", + "value": 2092979 + }, + { + "timestamp": "2017-01-01T16:40:00Z", + "value": 2095588 + }, + { + "timestamp": "2017-01-01T16:45:00Z", + "value": 2099586 + }, + { + "timestamp": "2017-01-01T16:50:00Z", + "value": 2102981 + }, + { + "timestamp": "2017-01-01T16:55:00Z", + "value": 2108053 + }, + { + "timestamp": "2017-01-01T17:00:00Z", + "value": 2107907 + }, + { + "timestamp": "2017-01-01T17:05:00Z", + "value": 2108241 + }, + { + "timestamp": "2017-01-01T17:10:00Z", + "value": 2100321 + }, + { + "timestamp": "2017-01-01T17:15:00Z", + "value": 2100448 + }, + { + "timestamp": "2017-01-01T17:20:00Z", + "value": 2100483 + }, + { + "timestamp": "2017-01-01T17:25:00Z", + "value": 2103042 + }, + { + "timestamp": "2017-01-01T17:30:00Z", + "value": 2103037 + }, + { + "timestamp": "2017-01-01T17:35:00Z", + "value": 2103040 + }, + { + "timestamp": "2017-01-01T17:40:00Z", + "value": 2103054 + }, + { + "timestamp": "2017-01-01T17:45:00Z", + "value": 2103058 + }, + { + "timestamp": "2017-01-01T17:50:00Z", + "value": 1830757 + }, + { + "timestamp": "2017-01-01T17:55:00Z", + "value": 1830855 + }, + { + "timestamp": "2017-01-01T18:00:00Z", + "value": 1831495 + }, + { + "timestamp": "2017-01-01T18:05:00Z", + "value": 1831463 + }, + { + "timestamp": "2017-01-01T18:10:00Z", + "value": 1831963 + }, + { + "timestamp": "2017-01-01T18:15:00Z", + "value": 1832046 + }, + { + "timestamp": "2017-01-01T18:20:00Z", + "value": 1832070 + }, + { + "timestamp": "2017-01-01T18:25:00Z", + "value": 1835511 + }, + { + "timestamp": "2017-01-01T18:30:00Z", + "value": 1835265 + }, + { + "timestamp": "2017-01-01T18:35:00Z", + "value": 1835481 + }, + { + "timestamp": "2017-01-01T18:40:00Z", + "value": 1835578 + }, + { + "timestamp": "2017-01-01T18:45:00Z", + "value": 1835611 + }, + { + "timestamp": "2017-01-01T18:50:00Z", + "value": 1836314 + }, + { + "timestamp": "2017-01-01T18:55:00Z", + "value": 1836369 + }, + { + "timestamp": "2017-01-01T19:00:00Z", + "value": 1837280 + }, + { + "timestamp": "2017-01-01T19:05:00Z", + "value": 1842939 + }, + { + "timestamp": "2017-01-01T19:10:00Z", + "value": 1843126 + }, + { + "timestamp": "2017-01-01T19:15:00Z", + "value": 1845840 + }, + { + "timestamp": "2017-01-01T19:20:00Z", + "value": 1842444 + }, + { + "timestamp": "2017-01-01T19:25:00Z", + "value": 1839891 + }, + { + "timestamp": "2017-01-01T19:30:00Z", + "value": 1839875 + }, + { + "timestamp": "2017-01-01T19:35:00Z", + "value": 1839870 + }, + { + "timestamp": "2017-01-01T19:40:00Z", + "value": 1840090 + }, + { + "timestamp": "2017-01-01T19:45:00Z", + "value": 1840479 + }, + { + "timestamp": "2017-01-01T19:50:00Z", + "value": 1840479 + }, + { + "timestamp": "2017-01-01T19:55:00Z", + "value": 1840482 + }, + { + "timestamp": "2017-01-01T20:00:00Z", + "value": 1841522 + }, + { + "timestamp": "2017-01-01T20:05:00Z", + "value": 1841836 + }, + { + "timestamp": "2017-01-01T20:10:00Z", + "value": 1842377 + }, + { + "timestamp": "2017-01-01T20:15:00Z", + "value": 1842388 + }, + { + "timestamp": "2017-01-01T20:20:00Z", + "value": 1842489 + }, + { + "timestamp": "2017-01-01T20:25:00Z", + "value": 1842489 + }, + { + "timestamp": "2017-01-01T20:30:00Z", + "value": 1842489 + }, + { + "timestamp": "2017-01-01T20:35:00Z", + "value": 1842496 + }, + { + "timestamp": "2017-01-01T20:40:00Z", + "value": 1842689 + }, + { + "timestamp": "2017-01-01T20:45:00Z", + "value": 1843117 + }, + { + "timestamp": "2017-01-01T20:50:00Z", + "value": 1843116 + }, + { + "timestamp": "2017-01-01T20:55:00Z", + "value": 1843227 + }, + { + "timestamp": "2017-01-01T21:00:00Z", + "value": 1843138 + }, + { + "timestamp": "2017-01-01T21:05:00Z", + "value": 1843141 + }, + { + "timestamp": "2017-01-01T21:10:00Z", + "value": 1843310 + }, + { + "timestamp": "2017-01-01T21:15:00Z", + "value": 1843310 + }, + { + "timestamp": "2017-01-01T21:20:00Z", + "value": 1843507 + }, + { + "timestamp": "2017-01-01T21:25:00Z", + "value": 1843953 + }, + { + "timestamp": "2017-01-01T21:30:00Z", + "value": 1844778 + }, + { + "timestamp": "2017-01-01T21:35:00Z", + "value": 1843918 + }, + { + "timestamp": "2017-01-01T21:40:00Z", + "value": 1882692 + }, + { + "timestamp": "2017-01-01T21:45:00Z", + "value": 1974888 + }, + { + "timestamp": "2017-01-01T21:50:00Z", + "value": 2157136 + }, + { + "timestamp": "2017-01-01T21:55:00Z", + "value": 2154987 + }, + { + "timestamp": "2017-01-01T22:00:00Z", + "value": 2155664 + }, + { + "timestamp": "2017-01-01T22:05:00Z", + "value": 2155660 + }, + { + "timestamp": "2017-01-01T22:10:00Z", + "value": 2155824 + }, + { + "timestamp": "2017-01-01T22:15:00Z", + "value": 2155824 + }, + { + "timestamp": "2017-01-01T22:20:00Z", + "value": 2156329 + }, + { + "timestamp": "2017-01-01T22:25:00Z", + "value": 2156479 + }, + { + "timestamp": "2017-01-01T22:30:00Z", + "value": 2165269 + }, + { + "timestamp": "2017-01-01T22:35:00Z", + "value": 2165433 + }, + { + "timestamp": "2017-01-01T22:40:00Z", + "value": 2165739 + }, + { + "timestamp": "2017-01-01T22:45:00Z", + "value": 2165931 + }, + { + "timestamp": "2017-01-01T22:50:00Z", + "value": 2165928 + }, + { + "timestamp": "2017-01-01T22:55:00Z", + "value": 2165989 + }, + { + "timestamp": "2017-01-01T23:00:00Z", + "value": 2228961 + }, + { + "timestamp": "2017-01-01T23:05:00Z", + "value": 2228961 + }, + { + "timestamp": "2017-01-01T23:10:00Z", + "value": 2228961 + }, + { + "timestamp": "2017-01-01T23:15:00Z", + "value": 2485802 + }, + { + "timestamp": "2017-01-01T23:20:00Z", + "value": 2485802 + }, + { + "timestamp": "2017-01-01T23:25:00Z", + "value": 2486021 + }, + { + "timestamp": "2017-01-01T23:30:00Z", + "value": 2485293 + }, + { + "timestamp": "2017-01-01T23:35:00Z", + "value": 2485293 + }, + { + "timestamp": "2017-01-01T23:40:00Z", + "value": 2485324 + }, + { + "timestamp": "2017-01-01T23:45:00Z", + "value": 2489142 + }, + { + "timestamp": "2017-01-01T23:50:00Z", + "value": 2526312 + }, + { + "timestamp": "2017-01-01T23:55:00Z", + "value": 2526313 + }, + { + "timestamp": "2017-01-02T00:00:00Z", + "value": 2526314 + }, + { + "timestamp": "2017-01-02T00:05:00Z", + "value": 2526324 + }, + { + "timestamp": "2017-01-02T00:10:00Z", + "value": 2526325 + }, + { + "timestamp": "2017-01-02T00:15:00Z", + "value": 2526205 + }, + { + "timestamp": "2017-01-02T00:20:00Z", + "value": 2526226 + }, + { + "timestamp": "2017-01-02T00:25:00Z", + "value": 2526475 + }, + { + "timestamp": "2017-01-02T00:30:00Z", + "value": 2526471 + }, + { + "timestamp": "2017-01-02T00:35:00Z", + "value": 2526471 + }, + { + "timestamp": "2017-01-02T00:40:00Z", + "value": 2526534 + }, + { + "timestamp": "2017-01-02T00:45:00Z", + "value": 2526646 + }, + { + "timestamp": "2017-01-02T00:50:00Z", + "value": 2526646 + }, + { + "timestamp": "2017-01-02T00:55:00Z", + "value": 2526648 + }, + { + "timestamp": "2017-01-02T01:00:00Z", + "value": 2526658 + }, + { + "timestamp": "2017-01-02T01:05:00Z", + "value": 2526771 + }, + { + "timestamp": "2017-01-02T01:10:00Z", + "value": 2526773 + }, + { + "timestamp": "2017-01-02T01:15:00Z", + "value": 2526793 + }, + { + "timestamp": "2017-01-02T01:20:00Z", + "value": 2527010 + }, + { + "timestamp": "2017-01-02T01:25:00Z", + "value": 2527031 + }, + { + "timestamp": "2017-01-02T01:30:00Z", + "value": 3178096 + }, + { + "timestamp": "2017-01-02T01:35:00Z", + "value": 3196305 + }, + { + "timestamp": "2017-01-02T01:40:00Z", + "value": 3196202 + }, + { + "timestamp": "2017-01-02T01:45:00Z", + "value": 3196202 + }, + { + "timestamp": "2017-01-02T01:50:00Z", + "value": 3196205 + }, + { + "timestamp": "2017-01-02T01:55:00Z", + "value": 3229232 + }, + { + "timestamp": "2017-01-02T02:00:00Z", + "value": 3230463 + }, + { + "timestamp": "2017-01-02T02:05:00Z", + "value": 3230468 + }, + { + "timestamp": "2017-01-02T02:10:00Z", + "value": 3230468 + }, + { + "timestamp": "2017-01-02T02:15:00Z", + "value": 3230468 + }, + { + "timestamp": "2017-01-02T02:20:00Z", + "value": 3230470 + }, + { + "timestamp": "2017-01-02T02:25:00Z", + "value": 3230467 + }, + { + "timestamp": "2017-01-02T02:30:00Z", + "value": 3230506 + }, + { + "timestamp": "2017-01-02T02:35:00Z", + "value": 3231536 + }, + { + "timestamp": "2017-01-02T02:40:00Z", + "value": 3230723 + }, + { + "timestamp": "2017-01-02T02:45:00Z", + "value": 3230727 + }, + { + "timestamp": "2017-01-02T02:50:00Z", + "value": 3230727 + }, + { + "timestamp": "2017-01-02T02:55:00Z", + "value": 3230727 + }, + { + "timestamp": "2017-01-02T03:00:00Z", + "value": 3231880 + }, + { + "timestamp": "2017-01-02T03:05:00Z", + "value": 3232283 + }, + { + "timestamp": "2017-01-02T03:10:00Z", + "value": 3232283 + }, + { + "timestamp": "2017-01-02T03:15:00Z", + "value": 3232283 + }, + { + "timestamp": "2017-01-02T03:20:00Z", + "value": 3232325 + }, + { + "timestamp": "2017-01-02T03:25:00Z", + "value": 3232323 + }, + { + "timestamp": "2017-01-02T03:30:00Z", + "value": 3232327 + }, + { + "timestamp": "2017-01-02T03:35:00Z", + "value": 3232340 + }, + { + "timestamp": "2017-01-02T03:40:00Z", + "value": 3232713 + }, + { + "timestamp": "2017-01-02T03:45:00Z", + "value": 3232729 + }, + { + "timestamp": "2017-01-02T03:50:00Z", + "value": 3232756 + }, + { + "timestamp": "2017-01-02T03:55:00Z", + "value": 3233500 + }, + { + "timestamp": "2017-01-02T04:00:00Z", + "value": 3233500 + }, + { + "timestamp": "2017-01-02T04:05:00Z", + "value": 3233500 + } + ], + "granularity": "minutely", + "customInterval": 5, + "stableTrendWindow": 10, + "threshold": 0.99, + "period": 0 + } + }, + "responses": { + "200": { + "body": { + "period": 0, + "confidenceScores": [ + 0.11841763735063232, + 0.014857199927548581, + 0.0887032374955278, + 0.07430314751946857, + 0.059903057543409355, + 0.04132288981790399, + 0.022742722092391268, + 0.0005683208474757854, + 0.0216060803974397, + 0.053248991089971616, + 0.08489190178249614, + 0.04322511558132514, + 0.085336620199234, + 0.05876047041512903, + 0.02673755265447302, + 0.005032027060762012, + 0.031323171543775764, + 0.06299774949197792, + 0.08944723025337244, + 0.11523169864554421, + 0.14288453512268834, + 0.001592562559717675, + 0.32637788222282893, + 0, + 7.37310752217245e-15, + 2.211932256651735e-14, + 1, + 0.015697015891758138, + 0.01242773215043403, + 0.016188579169534697, + 0.019537751864826272, + 0.022506917491993753, + 0.01885762668253081, + 0.016253355310429398, + 0.017227483829906676, + 0.023236706002118527, + 0.03906277743439327, + 0.0354134866249377, + 0.037084294769315296, + 0.038248426822850935, + 0.050274427573818385, + 0.046815140298421175, + 0.043292518511668716, + 0.041353259508804745, + 0.038242312045861385, + 0.0346880230034313, + 0.032717096744889713, + 0.033026212895129546, + 0.031055286636580585, + 0.0275326648498355, + 0.023883374040372555, + 0.021564107969369743, + 0.018706498551854727, + 0.01543721481052325, + 0.015176320358565887, + 0.011527029549110314, + 0.008004407762357859, + 0.004355116952902286, + 0.0007058261434393403, + 0.0030701336887340946, + 0.006592755475479178, + 0.010147044517909256, + 0.013701333560339335, + 0.016780613767597707, + 0.020366570065705403, + 0.024015860875168354, + 0.02757014991759106, + 0.03033275756808058, + 0.03068865378707081, + 0.03395793752839492, + 0.03760722833785786, + 0.04122485189164318, + 0.030433874112103007, + 0.032816474694461056, + 0.03602242392443729, + 0.03960838022253762, + 0.04268766042980336, + 0.04633695123926631, + 0.0346592903007527, + 0.010219725324164698, + 0.007218892441326965, + 0.006909776291079754, + 0.000049463551460760754, + 0.0016047901503119819, + 0.01042121060065547, + 0.009020294944303705, + 0.005371004134840759, + 0.0021650549048718984, + 0.010517653997227793, + 0.0075017083013172925, + 0.00385241749186172, + 0.0008681390516288423, + 0.019005920148370017, + 0.015388296594592068, + 0.12583612799160215, + 1, + 0.005055878353042495, + 0.007613932468790628, + 0.011913685646822731, + 0.0166567804043268, + 0.015351429327405014, + 0.034309821169245976, + 0.0292817211106433, + 0.02425362105202589, + 0.019225520993423218, + 0.01419742093482055, + 0.00916932087621788, + 0.004141220817600464, + 0.0008868792410022057, + 0.0059149792996048755, + 0.010943079358207547, + 0.015971179416810213, + 0.02099927947542763, + 1, + 0.11533376425564247, + 0.1207645081246342, + 0.025174230145423273, + 0.09422487163021387, + 0.08417070843230404, + 0.07411654523437947, + 0.06406238203646963, + 0.0540082188385598, + 0.04395405564064997, + 0.03500824639144218, + 0.024954083193532338, + 0.014899919995622513, + 0.004845756797712681, + 0.005208406400211895, + 0.015262569598121728, + 0.025316732796031558, + 0.03537089599394139, + 0.045425059191865964, + 0.05145748091871777, + 1, + 0.011663506282381296, + 0.0043856580970499884, + 0.002892190088273945, + 0.01017003827359788, + 0.01744788645892181, + 0.024725734644253115, + 0.03200358282957705, + 0.03928143101490098, + 0.046559279200224915, + 0.05383712738555622, + 0.060069956133518614, + 0.0450857235774741, + 0.050621872700536176, + 0.029050850963546225, + 0.045689493056171517, + 0.0385699811492357, + 0.03179880905474635, + 0.03082274474926925, + 0.03586345902254038, + 0.028585610837209074, + 0.021402764418918006, + 0.04705886213832124, + 0.049724532235770696, + 0.05957866937203304, + 0.052649160999162954, + 0.045371312813839014, + 0.03809346462851508, + 0.030815616443183775, + 0.023537768257859845, + 0.01945831289597576, + 0.012180464710644455, + 0.00490261652532052, + 0.002153560870260057, + 0.0033196287098028916, + 0.0029244412792105113, + 0.0043217396504358, + 0.010934575466529664, + 0.018117421884820732, + 0.02267188608187652, + 0.027321352045957807, + 0.03459920023128174, + 0.03563859904812146, + 0.02990120514994264, + 0.03607069938654979, + 0.017223061637835352, + 7.37310752217245e-15, + 1.47462150443449e-14, + 1, + 0.046440552438977135, + 0.012233652454378385, + 0.017033155644526038, + 0.05136672465183527, + 0.06970832954194527, + 0.09929181019761117, + 0.11281999222473732, + 0.11039622919405537, + 0.08125609011787617, + 0.05661270134791935, + 0.028264243663680723, + 0.005974323576610399, + 0.038471191754617544, + 0, + 0, + 0, + 0.020288532128574968, + 0.005041879493223223, + 0.009223088216122232, + 0.009332792637570532, + 0.024579445272937026, + 0.03289096891488949, + 0.050695883419617865, + 1, + 0.000748013913075547, + 0.002186373999917361, + 0.0009330173541465358, + 0.00032033929162428933, + 0.0012886906362965138, + 0.002542047282052593, + 0.0007963481454318109, + 0.0004886757560166365, + 0.0016470306347398486, + 0.001063686451208582, + 0.0011980222832366648, + 0.00008700161821178273, + 0.0013086910082902394, + 0.0022770423529624643, + 0.000016333637160404937, + 0.0012053557529180517, + 0.0018570345408140537, + 0.0037297360397815314, + 0.003109724507563151, + 0.22869458705263188, + 0.2293374323429407, + 0.1140021204394844, + 0.0012381896969537412, + 0.11340677603264777, + 1, + 0.011793249472519423, + 0.008293225072094536, + 0.00469819890465153, + 0.0010715054815308995, + 0.0025551879416044767, + 0.006118546853369862, + 0.008605219072110835, + 0.0053601180131874334, + 0.008860142413597574, + 0.01248683583673295, + 0.01611352925985358, + 0.005878587160222206, + 0.013145429690188892, + 0.022280640305150038, + 0.01865394688201466, + 0.015027253458894031, + 0.012033905149325846, + 0.009040556839742916, + 0.005445530672299909, + 0.0018505045048569009, + 0.001744521662600853, + 0.005339547830043862, + 0.008760404091259945, + 0.012181260352490777, + 0.009902010591734853, + 0.007622760830993676 + ], + "isChangePoint": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/EntireDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/EntireDetect.json new file mode 100644 index 000000000000..648f4393922e --- /dev/null +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/EntireDetect.json @@ -0,0 +1,513 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "body": { + "series": [ + { + "timestamp": "1972-01-01T00:00:00Z", + "value": 826 + }, + { + "timestamp": "1972-02-01T00:00:00Z", + "value": 799 + }, + { + "timestamp": "1972-03-01T00:00:00Z", + "value": 890 + }, + { + "timestamp": "1972-04-01T00:00:00Z", + "value": 900 + }, + { + "timestamp": "1972-05-01T00:00:00Z", + "value": 961 + }, + { + "timestamp": "1972-06-01T00:00:00Z", + "value": 935 + }, + { + "timestamp": "1972-07-01T00:00:00Z", + "value": 894 + }, + { + "timestamp": "1972-08-01T00:00:00Z", + "value": 855 + }, + { + "timestamp": "1972-09-01T00:00:00Z", + "value": 809 + }, + { + "timestamp": "1972-10-01T00:00:00Z", + "value": 810 + }, + { + "timestamp": "1972-11-01T00:00:00Z", + "value": 766 + }, + { + "timestamp": "1972-12-01T00:00:00Z", + "value": 805 + }, + { + "timestamp": "1973-01-01T00:00:00Z", + "value": 821 + }, + { + "timestamp": "1973-02-01T00:00:00Z", + "value": 773 + }, + { + "timestamp": "1973-03-01T00:00:00Z", + "value": 883 + }, + { + "timestamp": "1973-04-01T00:00:00Z", + "value": 898 + }, + { + "timestamp": "1973-05-01T00:00:00Z", + "value": 957 + }, + { + "timestamp": "1973-06-01T00:00:00Z", + "value": 924 + }, + { + "timestamp": "1973-07-01T00:00:00Z", + "value": 881 + }, + { + "timestamp": "1973-08-01T00:00:00Z", + "value": 837 + }, + { + "timestamp": "1973-09-01T00:00:00Z", + "value": 784 + }, + { + "timestamp": "1973-10-01T00:00:00Z", + "value": 791 + }, + { + "timestamp": "1973-11-01T00:00:00Z", + "value": 760 + }, + { + "timestamp": "1973-12-01T00:00:00Z", + "value": 802 + }, + { + "timestamp": "1974-01-01T00:00:00Z", + "value": 828 + }, + { + "timestamp": "1974-02-01T00:00:00Z", + "value": 1030 + }, + { + "timestamp": "1974-03-01T00:00:00Z", + "value": 889 + }, + { + "timestamp": "1974-04-01T00:00:00Z", + "value": 902 + }, + { + "timestamp": "1974-05-01T00:00:00Z", + "value": 969 + }, + { + "timestamp": "1974-06-01T00:00:00Z", + "value": 947 + }, + { + "timestamp": "1974-07-01T00:00:00Z", + "value": 908 + }, + { + "timestamp": "1974-08-01T00:00:00Z", + "value": 867 + }, + { + "timestamp": "1974-09-01T00:00:00Z", + "value": 815 + }, + { + "timestamp": "1974-10-01T00:00:00Z", + "value": 812 + }, + { + "timestamp": "1974-11-01T00:00:00Z", + "value": 773 + }, + { + "timestamp": "1974-12-01T00:00:00Z", + "value": 813 + }, + { + "timestamp": "1975-01-01T00:00:00Z", + "value": 834 + }, + { + "timestamp": "1975-02-01T00:00:00Z", + "value": 782 + }, + { + "timestamp": "1975-03-01T00:00:00Z", + "value": 892 + }, + { + "timestamp": "1975-04-01T00:00:00Z", + "value": 903 + }, + { + "timestamp": "1975-05-01T00:00:00Z", + "value": 966 + }, + { + "timestamp": "1975-06-01T00:00:00Z", + "value": 937 + }, + { + "timestamp": "1975-07-01T00:00:00Z", + "value": 896 + }, + { + "timestamp": "1975-08-01T00:00:00Z", + "value": 858 + }, + { + "timestamp": "1975-09-01T00:00:00Z", + "value": 817 + }, + { + "timestamp": "1975-10-01T00:00:00Z", + "value": 827 + }, + { + "timestamp": "1975-11-01T00:00:00Z", + "value": 797 + }, + { + "timestamp": "1975-12-01T00:00:00Z", + "value": 843 + } + ], + "maxAnomalyRatio": 0.25, + "sensitivity": 95, + "granularity": "monthly" + } + }, + "responses": { + "200": { + "body": { + "isNegativeAnomaly": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "expectedValues": [ + 827.79409082439679, + 798.91337746719273, + 888.60584318071892, + 900.5606407986661, + 962.83894263783043, + 933.25916063069542, + 891.07841047996658, + 856.17816013636968, + 809.89872279089411, + 807.375129007505, + 764.31966824485175, + 803.933498594564, + 823.59006208830579, + 794.09056413342876, + 883.164245249282, + 894.84190006909535, + 956.84305911012575, + 927.62850551901136, + 885.812983784303, + 851.6424797402517, + 806.0927886943216, + 804.68268153120289, + 762.74070738882, + 804.0251702513732, + 825.35236625795585, + 798.04041887249764, + 889.30165055776979, + 902.4226124345937, + 965.867078532635, + 937.32004957366951, + 896.17205247111019, + 862.00873684136559, + 816.46623420974231, + 814.42977455247092, + 771.8614479159354, + 811.859271346729, + 831.89982792155206, + 802.947544797165, + 892.56844074350829, + 904.54882145338092, + 966.85270638447071, + 937.31683910030426, + 895.180003672544, + 860.36495963566347, + 814.17072859690427, + 811.9054862686213, + 769.10837696107421, + 809.23280846597038 + ], + "isPositiveAnomaly": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "lowerMargins": [ + 41.389704541219835, + 39.945668873359637, + 44.430292159035943, + 45.028032039933308, + 48.14194713189152, + 46.662958031534771, + 44.553920523998329, + 42.808908006818484, + 40.494936139544706, + 40.368756450375251, + 38.215983412242586, + 40.196674929728196, + 41.179503104415289, + 39.704528206671441, + 44.1582122624641, + 44.742095003454772, + 47.842152955506293, + 46.381425275950569, + 44.290649189215145, + 42.582123987012579, + 40.30463943471608, + 40.234134076560146, + 38.137035369441, + 40.201258512568664, + 41.267618312897795, + 39.902020943624883, + 44.465082527888491, + 45.121130621729684, + 48.293353926631752, + 46.866002478683477, + 44.808602623555508, + 43.100436842068284, + 40.823311710487111, + 40.721488727623544, + 38.593072395796774, + 40.592963567336447, + 41.5949913960776, + 40.147377239858251, + 44.628422037175412, + 45.227441072669045, + 48.34263531922354, + 46.865841955015213, + 44.759000183627194, + 43.018247981783169, + 40.708536429845211, + 40.595274313431062, + 38.455418848053711, + 40.461640423298519 + ], + "period": 12, + "upperMargins": [ + 41.389704541219835, + 39.945668873359637, + 44.430292159035943, + 45.028032039933308, + 48.14194713189152, + 46.662958031534771, + 44.553920523998329, + 42.808908006818484, + 40.494936139544706, + 40.368756450375251, + 38.215983412242586, + 40.196674929728196, + 41.179503104415289, + 39.704528206671441, + 44.1582122624641, + 44.742095003454772, + 47.842152955506293, + 46.381425275950569, + 44.290649189215145, + 42.582123987012579, + 40.30463943471608, + 40.234134076560146, + 38.137035369441, + 40.201258512568664, + 41.267618312897795, + 39.902020943624883, + 44.465082527888491, + 45.121130621729684, + 48.293353926631752, + 46.866002478683477, + 44.808602623555508, + 43.100436842068284, + 40.823311710487111, + 40.721488727623544, + 38.593072395796774, + 40.592963567336447, + 41.5949913960776, + 40.147377239858251, + 44.628422037175412, + 45.227441072669045, + 48.34263531922354, + 46.865841955015213, + 44.759000183627194, + 43.018247981783169, + 40.708536429845211, + 40.595274313431062, + 38.455418848053711, + 40.461640423298519 + ], + "isAnomaly": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/LastDetect.json b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/LastDetect.json new file mode 100644 index 000000000000..f6aee0843243 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/examples/LastDetect.json @@ -0,0 +1,220 @@ +{ + "parameters": { + "Endpoint": "{Endpoint}", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "body": { + "series": [ + { + "timestamp": "1972-01-01T00:00:00Z", + "value": 826 + }, + { + "timestamp": "1972-02-01T00:00:00Z", + "value": 799 + }, + { + "timestamp": "1972-03-01T00:00:00Z", + "value": 890 + }, + { + "timestamp": "1972-04-01T00:00:00Z", + "value": 900 + }, + { + "timestamp": "1972-05-01T00:00:00Z", + "value": 961 + }, + { + "timestamp": "1972-06-01T00:00:00Z", + "value": 935 + }, + { + "timestamp": "1972-07-01T00:00:00Z", + "value": 894 + }, + { + "timestamp": "1972-08-01T00:00:00Z", + "value": 855 + }, + { + "timestamp": "1972-09-01T00:00:00Z", + "value": 809 + }, + { + "timestamp": "1972-10-01T00:00:00Z", + "value": 810 + }, + { + "timestamp": "1972-11-01T00:00:00Z", + "value": 766 + }, + { + "timestamp": "1972-12-01T00:00:00Z", + "value": 805 + }, + { + "timestamp": "1973-01-01T00:00:00Z", + "value": 821 + }, + { + "timestamp": "1973-02-01T00:00:00Z", + "value": 773 + }, + { + "timestamp": "1973-03-01T00:00:00Z", + "value": 883 + }, + { + "timestamp": "1973-04-01T00:00:00Z", + "value": 898 + }, + { + "timestamp": "1973-05-01T00:00:00Z", + "value": 957 + }, + { + "timestamp": "1973-06-01T00:00:00Z", + "value": 924 + }, + { + "timestamp": "1973-07-01T00:00:00Z", + "value": 881 + }, + { + "timestamp": "1973-08-01T00:00:00Z", + "value": 837 + }, + { + "timestamp": "1973-09-01T00:00:00Z", + "value": 784 + }, + { + "timestamp": "1973-10-01T00:00:00Z", + "value": 791 + }, + { + "timestamp": "1973-11-01T00:00:00Z", + "value": 760 + }, + { + "timestamp": "1973-12-01T00:00:00Z", + "value": 802 + }, + { + "timestamp": "1974-01-01T00:00:00Z", + "value": 828 + }, + { + "timestamp": "1974-02-01T00:00:00Z", + "value": 1030 + }, + { + "timestamp": "1974-03-01T00:00:00Z", + "value": 889 + }, + { + "timestamp": "1974-04-01T00:00:00Z", + "value": 902 + }, + { + "timestamp": "1974-05-01T00:00:00Z", + "value": 969 + }, + { + "timestamp": "1974-06-01T00:00:00Z", + "value": 947 + }, + { + "timestamp": "1974-07-01T00:00:00Z", + "value": 908 + }, + { + "timestamp": "1974-08-01T00:00:00Z", + "value": 867 + }, + { + "timestamp": "1974-09-01T00:00:00Z", + "value": 815 + }, + { + "timestamp": "1974-10-01T00:00:00Z", + "value": 812 + }, + { + "timestamp": "1974-11-01T00:00:00Z", + "value": 773 + }, + { + "timestamp": "1974-12-01T00:00:00Z", + "value": 813 + }, + { + "timestamp": "1975-01-01T00:00:00Z", + "value": 834 + }, + { + "timestamp": "1975-02-01T00:00:00Z", + "value": 782 + }, + { + "timestamp": "1975-03-01T00:00:00Z", + "value": 892 + }, + { + "timestamp": "1975-04-01T00:00:00Z", + "value": 903 + }, + { + "timestamp": "1975-05-01T00:00:00Z", + "value": 966 + }, + { + "timestamp": "1975-06-01T00:00:00Z", + "value": 937 + }, + { + "timestamp": "1975-07-01T00:00:00Z", + "value": 896 + }, + { + "timestamp": "1975-08-01T00:00:00Z", + "value": 858 + }, + { + "timestamp": "1975-09-01T00:00:00Z", + "value": 817 + }, + { + "timestamp": "1975-10-01T00:00:00Z", + "value": 827 + }, + { + "timestamp": "1975-11-01T00:00:00Z", + "value": 797 + }, + { + "timestamp": "1975-12-01T00:00:00Z", + "value": 843 + } + ], + "maxAnomalyRatio": 0.25, + "sensitivity": 95, + "granularity": "monthly" + } + }, + "responses": { + "200": { + "body": { + "isAnomaly": false, + "isPositiveAnomaly": false, + "isNegativeAnomaly": false, + "period": 12, + "expectedValue": 809.23280846597038, + "upperMargin": 40.461640423298519, + "lowerMargin": 40.461640423298519, + "suggestedWindow": 49 + } + } + } +} From d61813cee043dd6c6eab26e78b83621cb47109b6 Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Mon, 8 Feb 2021 15:16:32 +0800 Subject: [PATCH 11/13] fix build failure --- .../AnomalyDetector/stable/v1.0/AnomalyDetector.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json index 973bd0730e58..a69bbfe44331 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json @@ -277,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": { - "$ref": "#/definitions/ImputeStrategy", - "description": "Optional argument, indicates how to impute the missing values in the series." } } }, From 687a6fb622618b0b91ae4635e322d4bff26a9fee Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Tue, 9 Feb 2021 10:29:50 +0800 Subject: [PATCH 12/13] update --- .../cognitiveservices/data-plane/AnomalyDetector/readme.go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md index 24b547cf519e..c6d1e676d2f1 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md @@ -31,5 +31,5 @@ These settings apply only when `--tag=release_1_0 --go` is specified on the comm Please also specify `--go-sdk-folder=`. ``` yaml $(tag) == 'release_1_0' && $(go) -output-folder: $(go-sdk-folder)/services/stable/cognitiveservices/v1.0/$(namespace) +output-folder: $(go-sdk-folder)/services/cognitiveservices/v1.0/$(namespace) ``` From b86618a447d8236529a4072cfff9efbeb20cc222 Mon Sep 17 00:00:00 2001 From: "yuyi@microsoft.com" Date: Tue, 9 Feb 2021 11:08:13 +0800 Subject: [PATCH 13/13] update --- .../data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json index a69bbfe44331..2a1b1f6eacad 100644 --- a/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json +++ b/specification/cognitiveservices/data-plane/AnomalyDetector/stable/v1.0/AnomalyDetector.json @@ -30,7 +30,7 @@ "/timeseries/entire/detect": { "post": { "summary": "Detect anomalies for the entire series in batch.", - "description": "This operation generates a model using an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.", + "description": "This operation generates a model with an entire series, each point is detected with the same model. With this method, points before and after a certain point are used to determine whether it is an anomaly. The entire detection can give user an overall status of the time series.", "operationId": "DetectEntireSeries", "parameters": [ {