0% found this document useful (0 votes)
4 views1 page

Anomaly Detection for Heat Stress

Algorithm 5.1 outlines a method for detecting heat stress based on anomalies in time series data of heat stress climate conditions (HSCC) parameters. It involves analyzing a sliding window of data, calculating statistical measures like median and interquartile range (IQR), and identifying anomalies based on these calculations. If certain conditions are met regarding the identified anomalies, the algorithm confirms heat stress; otherwise, it continues to slide the window and reassess.

Uploaded by

Sumanth Reddy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Anomaly Detection for Heat Stress

Algorithm 5.1 outlines a method for detecting heat stress based on anomalies in time series data of heat stress climate conditions (HSCC) parameters. It involves analyzing a sliding window of data, calculating statistical measures like median and interquartile range (IQR), and identifying anomalies based on these calculations. If certain conditions are met regarding the identified anomalies, the algorithm confirms heat stress; otherwise, it continues to slide the window and reassess.

Uploaded by

Sumanth Reddy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Algorithm 5.

1: Anomaly Based Heat Stress Detection


Input: Time series data HSCC parameters
SWS = 12 and AWS (Ws) = 3
Output: Heat-stress detection based on anomalies in Time series data

1. for i = 1 to K do
SWi = Hi+1, Hi+2, Hi+3, Hi+4, ..., Hi+n, Hi+(n+1) here n = 12 and Hi+(n+1) is the newly
added sample for the sequence

2. Arrange the sequence in ascending order


[{Hi+1, Hi+2, Hi+3, Hi+4, ..., Hi+n, Hi+(n+1)}]

3. Initialize Ws = 0;

4. Find median Q2 for [{Hi, Hi+1, Hi+2, Hi+3, Hi+4, ..., Hi+n, Hi+(n+1)}]
Using Q2 compute Q1 & Q3, IQR = Q3 - Q1
Compute Med couple MC.

5. If MC ≥ 0
[Q1 – 1.5 * exp(-4 * MC) * IQR, Q3 + 1.5 * exp(3 * MC) * IQR]
Else
[Q1 – 1.5 * exp(-3 * MC) * IQR, Q3 + 1.5 * exp(4 * MC) * IQR]
The sample that falls outside the IQR is termed as anomaly.

6. If Hi+(n+1) is an anomaly && Hi+(n+1) > max(SWi) && CTHI > MT


Then WS++
Else
Slide the window (SWi++) one step forward and go to step 2

7. If Ws != 3
SWAP ((Hi+(n+1), Hi+(n+2))) & Go to Step 3
Else
Heat stress confirmed

8. end for

Where,

MC = med_x≤Q2≤y h(xi - xj)

h(xi, xj) =
(x-Q2)(Q3-x)

Q3-Q1

You might also like