Data Machines
...
Models Supported by Data Machi...
Activity Models

List Anomalies

5min
this model will provide a list of anomalies occurring when captured using data streaming docid\ vku08owje1j2 quxcf6 k , when specific input parameters are provided for a specific data field, the threshold of tolerance for anomaly detection and the alpha value or the smoothness value to smoothen the data from spikes in given duration data ingestion through qualetics api is required for this model to return results note data streaming docid\ vku08owje1j2 quxcf6 k integration is required for this model please complete the integration setup, verifying data connection docid 4iiuungko4l0wf64u ywk and ensure that the streaming is going live docid\ yuos evgre81ztel8fwdi before using this model model input parameters name type required pre defined values info fieldname text yes name of the field on which we need to detect the anomalous values threshold number yes 0 100 what percentage of deviation from the mean should we consider as an anomaly? smoothness text low, normal, high smoothing or alpha value do you want to smoothen the spikes and dips in the data? if not provided, "normal" is applied as the default value duration number duration in number of days to fetch data for detecting anomalies if not provided, a value of 1 is applied as the default value actor text if looking for anomalies in a specific user's data, provide the user id this value needs to match the actor id included in the actor docid\ ee 5wvexfskvpw7 xlcll data object if not provided, all user data is considered action text if looking for anomalies for a specific type of event, provide the action or event name this value needs to match the action names included in the action docid\ q5siilm4setivxmz b9ti data object if not provided, all event data is considered context text if looking for anomalies for a specific context, provide the context name this value needs to match the context names included in the context docid\ f6e7 xxggwdi 9 qkuv4m data object if not provided, all event data is considered rest api input example the following rest api code is trying to detect anomalies on a temperature sensor data stream and looking for anomalies where the deviation from the mean is greater than or equal to 40% var settings = { "url" "https //mlapi qualetics com/api/datamachine/init?id=\<datamachine id>", "method" "post", "timeout" 0, "headers" { //add authorization headers here "content type" "application/json" }, "data" json stringify({ "fieldname" "temperature", "threshold" 40, "smoothness" "high", "duration" "10", "actor" "sensor1" }), }; $ ajax(settings) done(function (response) { console log(response); }); model output result parameter name parameter type info anomaly count number result text anomalies detected/anomalies not detected anomalies dictionary action name text name of the action provided in the action docid\ q5siilm4setivxmz b9ti data object actor text name of the actor provided in the actor docid\ ee 5wvexfskvpw7 xlcll data object anomaly boolean attributes dictionary data attributes sent as part of the context docid\ f6e7 xxggwdi 9 qkuv4m object using qualetics data streaming context name text name of the context provided as part of the context docid\ f6e7 xxggwdi 9 qkuv4m data object current value number value of the fieldname in the event recorded expected value number expected value deviation from expected number actual amount of deviation from the expected value id number unique id of the event timestamp datetime timestamp of the event rest api output example { "anomaly count" 3, "result" "anomalies detected", "sessionid" "4a5ff9d8 11cd 4f28 9aae 08e81eb39d38" "anomalies" \[ { "action name" "measure temperature", "actor" "sensor1", "anomaly" true, "attributes" { "temperature" "1 22876", "unit" "c" }, "context name" "temperature", "current value" 1 22876, "deviation from expected" 0 2805779525, "expected value" 0 9455036106, "id" 979752, "timestamp" "2023 12 16 07 14 27" }, { "action name" "measure temperature", "actor" "sensor1", "anomaly" true, "attributes" { "temperature" "1 280701", "unit" "c" }, "context name" "temperature", "current value" 1 280701, "deviation from expected" 0 1641549152, "expected value" 1 1084699119, "id" 983572, "timestamp" "2023 12 16 01 34 28" }, { "action name" "measure temperature", "actor" "sensor1", "anomaly" true, "attributes" { "temperature" "0 593536", "unit" "c" }, "context name" "temperature", "current value" 0 593536, "deviation from expected" 0 1087023829, "expected value" 0 4843758219, "id" 976603, "timestamp" "2023 12 16 01 28 27" } ] } standard output parameters every model execution output consists of the following standard output parameters input the input string required for the model to extract the categories original input this is the input provided to the first step in model which is retained across multiple steps in a data machine workflow final result the result of the model executed in the final step of the data machine workflow sessionid a unique session id that is generated for every execution of a data machine which can be used to retain results across multiple sessions status the result of the data machine execution if all of the steps in a sequence are successfully executed, a value of "completed" is provided if the execution is interrupted at any point, a value of "terminated" is provided with the reason for termination