$20
Pr.3.
You are given hourly energy consumption data from 5:00AM to 8:00PM in 1-hour interval, for 3 days.
Using this data, predict the energy consumption of the 4th day using a single decision unit (neuron). Note: Create code yourself (no external libraries).
The data is given in 1-hour increments in four text files (please download “Pr3_data.zip”). The training data for the first 3 days are named “train_data_X.txt” where “X” is the date. Use this data for training. In this example, time units are hours and consumption in kW.
Once the decision unit is trained, predict the energy consumption for the 4th date in 1-hour increments from 5:00AM to 8:00PM. Use the testing data to calculate the total error of the prediction. The testing data is in the file “test_data_4.txt”. (Note: do not use this data for training, the testing data is only for testing.)
Try out the following three single-neuron architectures:
a) b)
c)
Figure 1: Architectures
1) What are the inputs and outputs for this neuron (physical meaning)?
2) Which activation function is used in the three architectures above? Why?
a. Hint: it should output continuous real values linearly from –INF to +INF, not asymptotically ending in 0 and 1).
3) Compare the training and testing total error obtained using the architectures on Figure 1:
a. Train the decision unit on the data from the first 3 days. Report training total error for each of the three days. Present a graph (original data vs. trained model), similar to the Figure 2.
b. Predict the energy consumption of the 4th date. Calculate the total error of your prediction using the data for the 4th date. Report testing total error. Present a graph (original data vs. trained model), similar to the Figure 2.
4) Report the number of iterations, the learning rate, and data pre-processing steps you may have chosen (such as normalization of input data). Clearly explain why you selected these values and steps.
Figure 2: An example of the plot showing training data vs. model predictions