Skip to content

week 3/ai, crude oil prices #3

@oem

Description

@oem

Heya, first of all, thanks for your talk (I am the guy with the dopamin kick, if you remember :) ) ! I got a small problem with plotting the predicted oil prices. For me it looks like the predicted values are a very flat graph:
screen shot 2018-01-25 at 13 37 23

I figured out what the problem is: the test_set is an array with one scalar vector (dtype=object).
y_test meanwhile is an array with one float64 vector.
Plotting the object values seems to produce the wrong graph.

One solution would be following:
plt.plot(np.float64(test_set)[timesteps:len(y_test)], color = 'red', label = 'Real Crude Oil Prices')

this fixes it for me:
screen shot 2018-01-25 at 14 06 34

The other plots further down and at the beginning would need the same treatment.

Doing it in this cell is probably not the ideal location tho.

For reference, I am running:

Python: 3.6.3
Keras: 2.1.3
tensorflow: 1.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions