Time Series: Anomaly detection of Energy consumption

April 25, 2019
Various levels of energy consumption at different locations are used for Time Series analysis and detect anomalies using Azure ML
Various process involved in the creation of Azure Machine learning are detailed below. - Data The dataset is available for public from the UCI archive site, which contains info the energy consumption of Appliances and Lights in various rooms in the house. It also supports with temperature, humidity along with external weather information. The data is averaged over a 10-minute period for 4.5 months. The purpose of this experiment is to predict any anomalies in the Time series data. Also this experiment uses K-means clustering to group some of the instances with respect to rooms in the house and timing. The info is available at [location][1]. - Retrieve Data The dataset had 19,735 instances and core features did not have missing info. - Prepare Data The module “Apply SQL Transformation” was used to separate out the timestamps by date and time using SQLite (refer: https://sqlite.org/lang.html) select [date] as RecordDateTS, date([date]) as Recorddate, Time([date]) as RecordTime, strftime('%H',Time([date])) as RecordTimeHr, [Appliances] as Appliances, [lights] as lights, [T1] as T1, [RH_1] as RH_1, [T2] as T2, [RH_2] as RH_2, [T3] as T3, [RH_3] as RH_3, [T4] as T4, [RH_4] as RH_4, [T5] as T5, [RH_5] as RH_5, [T6] as T6, [RH_6] as RH_6, [T7] as T7, [RH_7] as RH_7, [T8] as T8, [RH_8] as RH_8, [T9] as T9, [RH_9] as RH_9, [T_out] as T_out , [Press_mm_hg] as Press_mm_hg, [RH_out] as RH_out, [Windspeed] as Windspeed, [Visibility] as Visibility, [Tdewpoint] as Tdewpoint, [rv1] as rv1, [rv2] as rv2 from t1 - Preprocess Data After various training run and it usage of “Filter Based Feature Selection”, it was found that that consumption of Lights did have correlation to the time of the day and rooms. Hence the following were used as part of the K-Means Clustering Temperature at Room-9 (T9), Relative Humidity at Room-5 (RH_5 Lights, Temperature at Room-7 (T7), Relative Humidity at Room-3 (RH_3) - Algorithm Given the energy consumption is by Appliances and Lights, 2 separate sets of Time series Anomaly detection were employed. This could be could be avoided if flag is made available to identify the instances by Appliances or Lights, which could be become part of the Web Service parameter if the model goes into production. - Results The scored labels were downloaded using “Convert to CSV” and plotted against Alert Indicators. Acknowledgment Thanks to Luis Candanedo, University of Mons (UMONS), for providing the dataset and making it available to public [1]: https://archive.ics.uci.edu/ml/datasets/Appliances+energy+prediction`enter code here`