Including New Customers in The Prediction of Electricity Consumption
Abstract
Det er avgjerande for bedrifter som kjøper straum på førehand å oppnå nøyaktige prognosar for forbruket. Ved å nytte maskinlæring og historiske data kan ein utvikle prediktive responssmodellar. Hovudmålet med masteroppgåva er å klassifisere nye kundar inn i passande klynger/grupper basert på startvariablane deira. Tanken er at klassifisering kan utvikle effektive prognosemodellar for nye kundar som manglar historisk times forbruksdata. Tibber, eit energiselskap som opererer i Norden, har velvillig levert oss tidsseriedata knytt til straumforbruket til kundane sine. Kunnskapen frå masteranalysen vil forhåpentlegvis gje verdifull innsikt for energiselskapet.
Dei viktigaste måla med denne oppgåva involverer å evaluere eit spekter av klassifikasjonsmetodar for å avgjere om nokre modellar viser god ytelse med akseptabel nøyaktigheit. Klynger vart nytta som responsvariabel for å evaluere ulike klassifiseringsmetodar. Desse klyngene blei til frå det gjennomsnittlege timesforbruket av ei undergruppe av datasettet. Fleire klassifikasjonsmodellar vart trente ved å nytte klyngene som responsvariablar, inkludert K-Nearest Neighbors (KNN), Linear Discriminant Analysis (LDA), Quadratic Discriminant Analysis (QDA), Support Vector Machine (SVM), Random Forest (RF) og Kernel Density Classifier (KDC). Blant desse viste LDA den beste ytelsen på testsettet, noko som førte til at den blei vald for vidare analyse.
Etterpå vart forbruksverdiane, for nye og gamle kundar, predikert ved å nytte ein Generalized Linear Model (GLM) og ein Linear Model (LM) for kvar gruppe. Det samla predikerte forbruket vart deretter samanlikna med det faktiske samla forbruket, målt i Mean Absolute Error (MAE). Sidan datasettet inneheldt fleire variablar og manglande verdiar, vart det utforska ulike tilnærmingsmåtar for å handtere dataen.
Den endelege MAE-verdien oppnådd med LDA-modellen for 248 nye kundar var 165.7 kWh. Då heile datasettet vart vurdert som ei gruppe, var MAE-verdien 218.3 kWh. Saman med den linære modellen vart det integrert ein ekstra variabel som omfatta forbruket frå dagen før. Denne inkluderinga resulterte i ein MAE på 159.7 kWh for klyngene. Som eit resultat viste kombinasjonen av klynge- og klassifikasjonsmetodar å gi ei auka nøyaktigheit i forhold til å sjå på alle dataane som ei klynge. For companies that purchase electricity in advance, achieving accurate predictions of consumption is crucial. Using machine learning and historical data enables the creation of predictive response models. The main topic in this thesis is to accurately classify new customers into appropriate clusters/groups based on their initial variables. The idea is that classification can develop effective prediction models for new homes lacking historical hourly consumption data. Tibber, an energy company operating in the Nordic region, has generously provided time series data related to customers' electricity consumption. The insights gained from the master analysis are anticipated to provide valuable information for the energy company.
The primary goal of this thesis involves to evaluate a range of classification methods to determine if any models exhibit exceptional performance in delivering an acceptable accuracy. Clusters were used as response variable to evaluate different classification methods. These clusters were created based on the mean hourly consumption within a subset of the data set. Several classification models have been trained using the clusters as response variables, including K-Nearest Neighbors (KNN), Linear Discriminant Analysis (LDA), Quadratic Discriminant Analysis (QDA), Support Vector Machine (SVM), Random Forest (RF), and Kernel Density Classifier (KDC). Among these, LDA demonstrated the best performance on the test set, leading to its selection for further analysis.
Later on, with the new customers together with the old customers, consumption values were predicted using a Generalized Linear Model (GLM) and a Linear Model (LM) for each group. The overall predicted consumption was then compared against the actual overall consumption, measured by Mean Absolute Error (MAE). Given the diverse variables and missing values in the data, various approaches to handle the data were explored.
The final MAE value achieved with the LDA model, where 248 of 829 were considered new customers, was 165.7 kWh. When considering the entire data set as one group, the MAE value was 218.3 kWh. Alongside with the linear model, an additional variable was later incorporated, involving the consumption variable from the previous day. This inclusion resulted in a MAE of 159.7 kWh for the clusters. Consequently, the combination of clustering and classification methods resulted in an improvement in accuracy compared to all the data as one single cluster.