Downloads · 30 days
0
Sari95/Linear-Regression-for-Energy-Consumption-Prediction
Linear-Regression-for-Energy-Consumption-Prediction is a machine learning model from Sari95. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as gpl.
This linear regression model predicts energy consumption based on meteorological data and historical energy usage from 2021 to 2023. It utilizes time series data from a transformer station to forecast future energy de…
Downloads · 30 days
0
Access
Public
Updated May 22, 2024
Repo size
—
Likes
2
Public
Click a slice to open those files.
.ipynb374 KB · 99%
From the Hugging Face model README
This linear regression model predicts energy consumption based on meteorological data and historical energy usage from 2021 to 2023. It utilizes time series data from a transformer station to forecast future energy demands. It is built using the statsmodels library in Python and incorporates both time-based and weather-related variables to enhance prediction accuracy.
Lastgang: Energy consumption dataHour: Hour of the dayDayOfWeek: Day of the weekLastgang_Moving_Average: Moving average of energy consumptionLastgang_First_Difference: First difference of energy consumptionThe model splits the data into training and testing sets, with the last 192 data points (equivalent to 48 hours at 15-minute intervals) designated as the test dataset. It defines target variables (Lastgang) and explanatory variables including hourly and daily patterns as well as derived features from the consumption data. The dataset includes preprocessed features such as scaled energy consumption (Lastgang), and time-related features (Hour, DayOfWeek).
To run this model, you need Python along with the following libraries:
pandasnumpymatplotlibstatsmodelssklearnTo execute the model:
Prediction_Linear-Regression.ipynb notebook.