Objectives:
The primary objectives of this lab are as follows:
1.Understand the importance of proper data arrangement for neural network training.
2.Learn the steps involved in preparing and organizing training data in MATLAB nntool.
3.Explore the impact of data arrangement on the neural network training process.
Introduction:
Artificial Neural Networks (ANNs) have gained popularity in load forecasting due to their
ability to capture complex relationships in the data. ANNs are computational models inspired
by the human brain's neural network structure. They consist of interconnected nodes (neurons)
organized in layers, including an input layer, one or more hidden layers, and an output layer.
Basic Architecture
ANNs are computational models inspired by the structure and function of biological neural
networks. They consist of interconnected nodes organized into layers, including input, hidden,
and output layers. ANNs use weighted connections and activation functions to process and
transform input data into output predictions.
To understand the basic structure of ANN, first grasp the term "node." Figure 1 depicts the
general model for a node.
Figure 01: Basic Structure of ANN.
Each node is connected to other nodes and receives a variety of inputs. The general model of
an ANN, inspired by a biological neuron, is illustrated by the linear arrays of nodes, referred
to as layers. This representation illustrates the three layers of ANN, namely the input, output,
and hidden layers.
Figure 02: Layers of an ANN model.
In the input layer X1, X2, X3, … Xn means multiple inputs in the network. While W1, W2,
W3, … Wn are called connection weights, representing the strength of a specific node. In ANN,
weights are considered the most important factors because they are numerical parameters that
determine the influence of neurons on each other and also impact the output, by transforming
the input.
In ANN, the processing is done in the hidden layer. The hidden layer implements two
operational functions, which are the aggregation function and the transfer function, also known
as the activation function. The summation function is the first step and in this part each input
(Xi) of the ANN is multiplied by the corresponding weight (Wi) and then the product Wi. Xi is
accumulated in the summation function ξ = Σ Wi. Xi. “B” is the bias value; This parameter is
used to adjust the output of the neuron in combination with the weighted sum of the input. This
process is denoted as equation:
Output = Σ (Weight × Input) + Deviation Output = Σ Weight × Input + Deviation E1
The activation function is the second stage; converts the input signal received from the
synthesis function module and turns it into the output of the node for the ANN model .
In general, each ANN has three main components, which are node character, network topology
and learning rules. The node character controls signal processing by defining the number of
inputs and outputs involved, the weights associated with each input and output, and the
activation function for each node. The learning rule sets the starting and adjusting the weights.
While network topology determines how nodes will be connected and organized. The operation
of the ANN model calculates the output of all neurons.
Procedure:
1.First select the data those are being used in nntool in MATLAB.
2.Categorize the data into different parameters such as Training Data, Target Data and Test Data.
And reserve data to compare with the ANN result.
Here we take Training Data:
Month Day Max. Temp Min. Temp Avg. Humidity Holiday History
Load
1 1 25 10 70 1 500
1 2 24 12 65 0 480
1 3 22 8 75 1 550
1 4 23 11 68 0 520
1 5 21 9 72 1 530
1 6 26 13 67 0 490
1 7 24 10 69 0 505
1 8 20 8 74 1 560
1 9 22 11 71 0 495
1 10 25 12 66 1 515
1 11 23 10 68 0 525
1 12 26 13 63 1 540
1 13 24 9 70 0 500
1 14 21 11 75 0 510
1 15 27 14 68 1 545
1 16 25 10 71 0 480
1 17 22 8 76 1 555
1 18 24 12 67 0 490
1 19 20 9 72 0 505
1 20 23 11 69 1 520
1 21 26 13 65 0 530
1 22 24 10 68 0 495
1 23 21 8 74 1 515
1 24 22 11 73 0 525
1 25 25 12 66 1 540
1 26 23 9 69 0 500
1 27 27 14 62 0 510
1 28 25 10 70 1 545
1 29 22 8 75 0 480
1 30 24 12 68 1 555
1 31 20 9 73 0 490
Data Table 01:2020 July Month Data.
Month Day Max. Temp Min. Temp Avg. Holiday History
Humidity Load
2 1 23 11 71 1 505
2 2 26 13 66 0 520
2 3 24 10 69 0 530
2 4 21 9 72 1 515
2 5 25 12 67 0 525
2 6 23 10 68 0 540
2 7 27 14 63 1 550
2 8 24 9 70 0 500
2 9 21 11 75 0 510
2 10 26 13 68 1 545
2 11 25 10 71 0 480
2 12 22 8 76 1 555
2 13 24 12 67 0 490
2 14 20 9 72 0 505
2 15 23 11 69 1 520
2 16 26 13 65 0 530
2 17 24 10 68 0 495
2 18 21 8 74 1 515
2 19 22 11 73 0 525
2 20 25 12 66 1 540
2 21 23 9 69 0 500
2 22 27 14 62 0 510
2 23 25 10 70 1 545
2 24 22 8 75 0 480
2 25 24 12 68 1 555
2 26 24 10 69 1 566
Data Table 01:2021 July Month Data.
Target Data: 28 545 511
Day History Target 29 480 455
Load Demand
30 555 448
Load
31 490 448
1 500 511
1 505 430
2 480 443
2 520 592
3 550 555
3 530 588
4 520 445
4 515 564
5 530 474
5 525 546
6 490 579
6 540 435
7 505 572
7 550 472
8 560 480
8 500 437
9 495 463
9 510 400
10 515 522
10 545 463
11 525 582
11 480 540
12 540 582
12 555 525
13 500 518
13 490 509
14 510 466
14 505 488
15 545 571
15 520 457
16 480 488
16 530 500
17 555 581
17 495 553
18 490 406
18 515 553
19 505 507
19 525 515
20 520 544
20 540 550
21 530 436
21 500 529
22 495 467
22 510 424
23 515 437
23 545 501
24 525 464
24 480 469
25 540 481
25 555 418
26 500 510
26 566 598
27 510 409
Data Table 03: Input and Output Target Data.
Test Data:
Month Day Max. Min. Avg. Holiday History
Temp Temp Humidity Load
Test 1 2 29 24 10 69 0 530
Test 2 1 12 26 13 63 1 540
3.In MATLAB Workspace create workspace Training data, target data and test data
4. Neural Network Design:
Design a simple feedforward neural network using the nntool interface. Specify the network
architecture, activation functions, and other parameters.
5. Training:
Use the training data to train the neural network. Adjust the training parameters such as the
learning rate, number of epochs, and performance goal.
6. Validation and Testing:
Evaluate the trained neural network using the validation and test datasets. Assess the
network's performance on unseen data.
Results and Discussion:
The experiment demonstrates the importance of proper data arrangement for neural network
training. By partitioning the data into training, validation, and test sets, we ensure that the
network generalizes well to unseen data. The choice of data partitioning ratios can impact the
network's performance, and tuning these parameters is often necessary.
The neural network's training process is influenced by the quality and quantity of the training
data. In this lab, the synthetic data allowed us to illustrate the steps involved in data
arrangement and its impact on training.
Conclusion:
Proper organization and partitioning of training data are critical for the successful training of
neural networks. MATLAB's nntool provides a user-friendly environment for designing,
training, and evaluating neural networks, making it a valuable tool for researchers and
practitioners in the field of machine learning.