Dataset preprocessing

In order to assure a better convergence of the backpropagation methods, we should try to normalize the input data. So, we will be applying the classic scale and centering technique, subtracting the mean value, and scaling by the floor() of the maximum value. To get the required values, we use the pandas describe() method:

print(df.describe())
array=(df.values - 145.33) /338.21
plt.subplot()
plot_test, = plt.plot(array[:1500], label='Normalized Load')
plt.legend(handles=[plot_test])                Load
count  140256.000000
mean      145.332503
std        48.477976
min         0.000000
25%       106.850998
50%       151.428571
75%       177.557604
max       338.218126

This is the graph of our normalized data:

In this step, we will prepare our input dataset, because we need an ...

Get Machine Learning for Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.