anomalyDetector issue with CognitiveService with simple data

Abinash Tumulu 56 Reputation points Microsoft Employee
2022-08-29T14:25:49.2+00:00

I'm using simple time series data however API is throwing error as mentioned, please guide how to proceed?

Error:
"{"response":"{\"code\":\"InvalidSeries\",\"message..."
response: ""{\"code\":\"InvalidSeries\",\"message\":\"The 'timestamp' at index 1 is invalid in daily granularity with 1 gran as interval.\"}\n""
status: "{"protocolVersion":{"protocol":"HTTP","major":1,"m..."
protocolVersion: "{"protocol":"HTTP","major":1,"minor":1}"
statusCode: "400"
reasonPhrase: ""Bad Request""

from mmlspark.cognitive import *  
from notebookutils import mssparkutils  

anomalyDetector = (SimpleDetectAnomalies()  
    .setLinkedService("cs_ci_poc")  
    .setOutputCol("output")  
    .setErrorCol("error")  
    .setGranularity("daily")  
    .setTimestampCol("timestamp")  
    .setValueCol("value")  
    .setGroupbyCol("group"))  



results = anomalyDetector.transform(df)  
display(results.select("timestamp", "value", "group", "output.*", "error").limit(10))  

PFB screenshots:
235750-image.png

235755-image.png

235756-image.png

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,364 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Abinash Tumulu 56 Reputation points Microsoft Employee
    2022-09-07T04:51:16.913+00:00

    Tried, getting error:

    ValueError: Cannot convert column into bool: please use '&' for 'and', '|' for 'or', '~' for 'not' when building DataFrame Boolean expressions.

    Also, by seeing the actual error(from 1st post) - is it expecting timestamp should be in equal interval i.e. 24hrs difference?

    238385-image.png