Ejemplo n.º 1
0
# df_data_1_test = raw_values[upper_train - 1:upper_test]
df_data_1_test = diff_values[upper_train:upper_test]
test_set = df_data_1_test.values

# reshaping
test_set = numpy.reshape(test_set, (test_set.shape[0], 1))

# scaling
test_set = sc.fit_transform(numpy.float64(test_set))

x_test, y_test = data_misc.test_data_to_timesteps(
    test=test_set, testset_length=testset_length, timesteps=timesteps)

rmse, predictions = compare(y_test, y_test)

predicted_bcg_values_test_mae = regressor_mae.predict(x_test,
                                                      batch_size=batch_size)
regressor_mae.reset_states()

print(predicted_bcg_values_test_mae.shape)

# reshaping
predicted_bcg_values_test_mae = numpy.reshape(
    predicted_bcg_values_test_mae, (predicted_bcg_values_test_mae.shape[0],
                                    predicted_bcg_values_test_mae.shape[1]))

y_test = numpy.reshape(y_test, (y_test.shape[0], y_test.shape[1]))

print(predicted_bcg_values_test_mae.shape)

# inverse transform
predicted_bcg_values_test_mae = sc.inverse_transform(