How to use AnomalyDetection_ChangePoint Anomaly detection?

Novin George Thomas 0 Reputation points
2024-01-18T05:04:08.49+00:00

Hi , I look to find the anomaly detection using AnomalyDetection_ChangePoint two parameters using Tumbling window grouping(since its a non stable value input), but I have doubt regarding the set point, is it possible to give a set point or threshold kind of value using this Anomaly function, please find my current sql query below, I need help to write anomaly detection for both 'v_dist' and 'v_freq',. I understood the spike and dips function but unclear here in this Anomaly function

WITH s1 AS (
SELECT
    PublishTimestamp AS DeviceTimestamp,
    GetArrayElement(GetArrayElement(Content, 0).Data, 0) AS DataRecords
FROM [iciiothub-1]
)
SELECT s1.DeviceTimestamp,
       s1.DataRecords,
       ValueRecords.ArrayValue.DisplayName,
       ValueRecords.ArrayValue.Address,
       ValueRecords.ArrayValue.Value      
INTO
[accelerometerAnomaly-1]
FROM s1
CROSS APPLY GetArrayElements(DataRecords.[Values]) AS ValueRecords
 
WHERE
    ValueRecords.ArrayValue.DisplayName IN ('v_dist','v_freq')
Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
330 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde 28,386 Reputation points MVP
    2024-01-18T16:51:23.1666667+00:00

    Hello @Novin George Thomas,

    welcome to this moderated Azure community forum.

    Azure Stream Analytics support single point anomaly detection. The difference with a tipping point alert is that it tries to figure out if there is an anomaly based on:

    • the type of anomaly (spike, dip, etc.)
    • the value to check
    • the number of (past) messages to compare
    • the expected duration these message arrive
    • the confidence needed

    With the query seen above, you first need to provide a stream having the values you want to check.

    For each value, write an extra select having the anomaly detection.

    Lastly, based on the outcome of the anomaly detection outcome, you can construct a message to output.

    Check out this blog post with examples based on dip and spike anomaly detection. This also applies to ChangePoint anomaly detection.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.