# Identification of Typical and Anomalous Patterns in Electricity Consumption
## 2 Methodology
### Detection of Primary Atypical Consumption (Outliers)  
Initially, a set of filters was applied to the data with the purpose of filtering the time series with low data quality and categorizing the most discernible abnormal cases. Within this phase the following abnormality filters were implemented:  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Jan.** & **Feb.** & **Mar.** & **Apr.** & **May** & **Jun.** & **Jul.** & **Aug.** & **Sep.** & **Oct.** & **Nov.** & **Dec.** \\ \hline
0.09 & 0.08 & 0.08 & 0.08 & 0.08 & 0.09 & 0.08 & 0.08 & 0.09 & 0.08 & 0.08 \\ \hline
0.02 & 0.01 & 0.03 & 0.06 & 0.08 & 0.12 & 0.22 & 0.14 & 0.06 & 0.02 & 0.03 \\ \hline \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\ldots\) \\ \hline \end{tabular}
\end{table}
Table 2: Examples of P_month instances.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Mon.** & **Tue.** & **Wed.** & **Thu.** & **Fri.** & **Sat.** & **Sun.** \\ \hline
0.123 & 0.119 & 0.118 & 0.121 & 0.127 & 0.189 & 0.203 \\ \hline
0.143 & 0.144 & 0.144 & 0.144 & 0.144 & 0.142 & 0.139 \\ \hline
0.159 & 0.166 & 0.168 & 0.165 & 0.159 & 0.103 & 0.079 \\ \hline \(\ldots\) & \(\ldots\) & \(\ldots\) & \(\Data gaps--permits the identification of the lack of quality in the analyzed series. If a consumer data series has too many gaps, the consumer will be labelled as \"Large gaps\" and the classification for these cases stops here.  Low or no consumption--identifies installations with very low or no consumption. If the consumption is N times smaller than the first quartile limit, the consumer is classified as \"Low consumption\". This analysis and the quartiles set are independently attained for each voltage level. N is specified by the user.  Low-frequency usage--identifies the consumers that have a large percentage of very low consumption (below a minimum threshold). This minimum is defined individually for each installation and is based on the average consumption. The user is allowed to modify these parameters. The installations identified by the defined filters in points \"b\" and \"c\" are labelled \"low or no consumption\" and \"low-frequency usage\" respectively.  Concentrated consumption (week)--identifies the installations with a considerable percentage of the total consumption on a specific day of the week. If the consumption on Wednesdays is 50% of the week, then the consumer is classified as \"CC_w\". The same applies to other weekdays or other percentages (specified by the user). For example, it was found that some consumers have approximately 60% of their consumption on Tuesdays. This set of consumers is immediately classified as CC_w and extracted from the set of consumers that will be subjected to weekly consumption clustering.  Concentrated consumption (month)--identifies the installations with a large part of the consumption in a specific month of the year. For example, if the consumption in September is 40% of the whole year, then the consumer is classified as \"CC_m\" and extracted from the set of consumers that will be subjected to monthly consumption clustering. The same applies to other months or other percentages (specified by the user). These cases represent certain aspects of abnormalities. The consumers with these tags are filtered and do not pass to the following phase. In this way, the clustering algorithm will be applied to a more homogenous set which makes the clustering much more effective.