Data Machines
...
Models Supported by Data Machi...
Activity Models
Check Anomaly
5min
this model can verify whether a data point is an anomaly, for a specific data point when the data is provided through qualetics data streaming 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 value number yes provide a specific value to check whether it is an anomaly timestamp datetime yes provide the timestamp corresponding to the value in yyyy mm dd hh\ mm\ ss format 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 used to verify whether a particular event is an anomaly based on the values recorded on a temperature sensor data stream, and specifically checking whether 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" 1, "value" "1 22876", "timestamp" "2023 12 16 07 14 27", "actor" "sensor1" }), }; $ ajax(settings) done(function (response) { console log(response); }); model output result parameter name parameter type info expected value number deviation from expected number value number timestamp datetime id number unique id of the event rest api output example { "deviation from expected" 0 2805779525, "expected value" 0 9455036106, "fieldname" "temperature", "final result" "anomaly found", "id" 979752, "result" "anomaly found", "sessionid" "d3c76a85 5693 40b2 8313 306f3d34cbce", "timestamp" "2023 12 16 07 14 27", "value" "1 22876" } 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