Abstract
The electricity grid infrastructure by introducing new powerful communication system between
consumer and supplier. Implementation of smart meters increases the availability of detail level of
consumer electricity load profile data. To improve and efficient planning and development of
this new power system, a primary challenge is to analyze the electricity consumption data. To analyze
the energy consumption or achieve our objective we choose the best analytic process is data mining
techniques including exploratory data analysis and preprocessing, frequent patterns mining and
associations, classification characterization, clustering and outlier deduction.
Simply put, energy forecasting is the practice of using statistical data to predict consumption levels and
corresponding utility expenditures for both the short and long term. Bayesian classifiers are the
statistical classifiers. Bayesian classifiers can predict class membership probabilities such as the
probability that a given tuple belongs to a particular class.
INTRODUCTION
In electric distribution networks, the identification of electric load profiles is of great interest for
electric energy distribution network planners and operators. The grouping distribution of feeders can be
useful for tasks such as the simulation of the impact of new grid technologies, new tariffs, or network
re-configurations. Furthermore, the identification of a set of representative feeders allows the load
distribution to be modeled avoiding an exhaustive simulation process on every feeder of the network.
To identify representative feeders, operators often use deterministic and aggregated
load models. This approach is straightforward to apply and clear to assess. However, it
fails in the presence of uncertainties leading to suboptimal solutions. In order to integrate
the uncertainties, probabilistic and optimization load modeling approaches have been
applied. Despite the improvement with respect to the aggregated model, they require
detailed knowledge or assumptions at an appliance level. To overcome this problem, the
clustering approach finds the best model according to the data. In this approach, different
electric characteristics are taken into consideration to generate the model.
Objectives of electricity consumption
Objective to reduce energy use. Today, most of the heating, electricity and cooling that uses is from
renewable sources that do not have any net carbon dioxide emissions. works with energy efficiency
measures to further reduce its environmental impact and costs.
Tools and Techniques of Data Mining
Techniques
Association rule
Classification
Clustering
Regression
Sequence & path analysis
Neural networks
Prediction
For house use predicting: - To find a numerical output, prediction is used. The training dataset
contains the inputs and numerical output values. According to the training dataset, the algorithm
generates a model or predictor. When fresh data is provided, the model should find a numerical output.
This approach, unlike classification, does not have a class label. A continuous-valued function or
ordered value is predicted by the model.
Prediction Issues:
Preparing the data for prediction is the most pressing challenge. The following activities are involved in
data preparation:
Data Cleaning: Cleaning data include reducing noise and treating missing values.
Smoothing techniques remove noise, and the problem of missing values is solved by replacing a
missing value with the most often occurring value for that characteristic.
Relevance Analysis: The irrelevant attributes may also be present in the database. The
correlation analysis method is used to determine whether two attributes are connected.
Data Transformation and Reduction: Any of the methods listed below can be used to
transform the data.
Methods for Prediction
Predictive modeling uses some of the same techniques and terminology as other data mining processes.
Here are four examples:
Forecast modeling: This is a common technique in which the computer answers a question
(for instance, How much milk should a store have in stock on Monday?) by analyzing historical
data.
Classification modeling: Classification places data into groups where it can be used to
answer direct questions.
Cluster modeling: By clustering data into groups with shared characteristics, a predictive
model can be used to study those data sets and make decisions.
Time series modeling: This model analyzes data based on when the data was input. A study
of sales trends over a year is an example of time series modeling.
Tools:-
Monkey Learn | No-code text mining tools.
Rapid Miner | Drag and drop workflows or data mining in Python.
Oracle Data Mining | Predictive data mining models.
IBM SPSS Modeler | A predictive analytics platform for data scientists.
Weka | Open-source software for data mining.
Our libreries:-
pandas:- is a Python library for data analysis
NumPy :-is a Python library used for working with arrays. It also has functions for
working in domain of linear algebra, fourier transform, and matrices
plotly.express:- module (usually imported as px ) contains functions that can create
entire figures at once, and is referred to as Plotly Express or PX. Plotly Express is a
built-in part of the plotly library, and is the recommended starting point for creating
most common figures.
Methodology /procedure
The methodology provides a framework that includes six stages, which can be repeated as in a loop
with the aim to review and refine the forecasting model.
Step 1: Understand the Business.
Step 2: Understand the Data.
Step 3: Prepare the Data.
Step 4: Build the Model.
Step 5: Evaluate the Results.
Step 6: Implement Change and Monitor.
Energy Consumption Predictions with Bayesian LSTMs in PyTorch
For simplicity and speed when running this notebook, only temporal and autoregressive features are
used.
date time year-month-day hour:minute:second, sampled every 10 minutes
Appliances, energy use in Why for the corresponding 10-minute timestamp
day_of_week, where Monday corresponds to 0
hour_of_day
What is Energy Consumption Predictions?
It just so happens that the best strategy to achieve energy efficiency in buildings is through something
called “forecasting.” Simply put, energy forecasting is the practice of using statistical data to predict
consumption levels and corresponding utility expenditures for both the short and long term.
Bayesian LSTMs is a kind of LSTM that uses dropout to perform Bayesian inference. It uses the simple
one, which consists of three gates (input, output, forget) and a cell unit. The gate uses a sigmoid
activation function, while input and cell state usually use than to convert
Bayesian classification is based on Bayes' Theorem. Bayesian classifiers are the statistical classifiers.
Bayesian classifiers can predict class membership probabilities such as the probability that a given
tuple belongs to a particular class.
Bayesian Belief Network
Bayesian Belief Networks specify joint conditional probability distributions. They are also known as
Belief Networks, Bayesian Networks, or Probabilistic Networks.
A Belief Network allows class conditional independencies to be defined between subsets of variables.
It provides a graphical model of causal relationship on which learning can be performed.
We can use a trained Bayesian Network for classification.
Step 1: Preliminary Data Wrangling for features
A set of conditional probability tables
Step 2:- Time Series Transformations
1. The dataset is to be re-sampled at an hourly rate for more meaningful analytics.
2. To alleviate exponential effects, the target variable is log-transformed as per the Uber
paper.
3. For simplicity and speed when running this notebook, only temporal and autoregressive
features, namely day_of_week, hour_of_day,
and previous values of Appliances are used as features
Step 3: Prepare Training Data
For this example, we will use sliding windows of 10 points per each window (equivalent to 10 hours)
to predict each next point. The window size can be altered via the sequence length variable.
Min-Max scaling has also been fitted to the training data to aid the convergence of the neural network.
Step 4:- Use Define Bayesian LSTM Architecture
To demonstrate a simple working example of the Bayesian LSTM, a model with a similar architecture
and size to that in Uber's paper has been used a starting point. The network architecture is as follows:
Encoder-Decoder Stage:
1. A uni-directional LSTM with 2 stacked layers & 128 hidden units acting as an encoding layer to
construct a fixed-dimension embedding state
2. A uni-directional LSTM with 2 stacked layers & 32 hidden units acting as a decoding layer to
produce predictions at future steps
3. Dropout is applied at both training and inference for both LSTM layers
Predictor Stage:
1. fully-connected output layer with 1 output (for predicting the target value) to produce a single
value for the target variable
By allowing dropout at both training and testing time, the model simulates random sampling, thus
allowing varying predictions that can be used to estimate the underlying distribution of the target value,
enabling explicit model uncertainties.
Setp 6:- Begin Training
To train the Bayesian LSTM, we use the ADAM optimizer along with mini-batch gradient descent
(batch size = 128). For quick demonstration purposes, the model is trained for 150 epochs.
The Bayesian LSTM is trained on the first 70% of data points, using the aforementioned sliding
windows of size 10. The remaining 30% of the dataset is held out purely for testing
for those the output is:-
epoch 10 loss: 0.021331658586859703
epoch 20 loss: 0.01902003400027752
epoch 30 loss: 0.01965978927910328
epoch 40 loss: 0.017205342650413513
epoch 50 loss: 0.01645931601524353
epoch 60 loss: 0.017352448776364326
epoch 70 loss: 0.011554614640772343
epoch 80 loss: 0.013196350075304508
epoch 90 loss: 0.0104022566229105
epoch 100 loss: 0.008596537634730339
epoch 110 loss: 0.00793543178588152
epoch 120 loss: 0.006831762846559286
epoch 130 loss: 0.007397405803203583
epoch 140 loss: 0.0039006543811410666
epoch 150 loss: 0.004320652689784765
step 7:- Evaluating Model Performance
The Bayesian LSTM implemented is shown to produce reasonably accurate and sensible results on
both the training and test sets, often comparable to other existing frequentist machine learning and deep
learning methods.
Step 9:- Uncertainty Quantification
The fact that stochastic dropouts are applied after each LSTM layer in the Bayesian LSTM enables
users to interpret the model outputs as random samples from the posterior distribution of the target
variable.
This implies that by running multiple experiments/predictions, can approximate parameters of the
posterioir distribution, namely the mean and the variance, in order to create confidence intervals for
each prediction.
In this example, we construct 99% confidence intervals that are three standard deviations away from
the approximate mean of each prediction.
Step 10:-Evaluating Uncertainty
Using multiple experiments above, 99% confidence intervals have been constructed for each the
prediction of the target variable (the logarithm of appliance power consumption). While we can
visually observe that the model is generally capturing the behavior of the time-series, approximately
only 50% of the real data points lie within a 99% confidence interval from the mean prediction value.
Despite the relatively low percentage of points within the confidence interval, it must be noted that
Bayesian Neural Networks only seek to quantify the epistemic model uncertainty and does not account
for aleatoric uncertainty (i.e. noise).
Referanca:-
https://colab.research.google.com/github/PawaritL/BayesianLSTM/blob/master/
Energy_Consumption_Predictions_with_Bayesian_LSTMs_in_PyTorch.ipynb#scrollTo=uWNK0BtB2
W0E
https://www.google.com/search?
q=result+accuresy+Energy+Consumption+Predictions&client=ubuntu&hs=eLE&channel=fs&sxsrf=A
JOqlzUrCveiXJ1x84vGTpZ1xw-d2aLq.