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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.