Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

week 3/ai, crude oil prices #3

Open
oem opened this issue Jan 25, 2018 · 0 comments
Open

week 3/ai, crude oil prices #3

oem opened this issue Jan 25, 2018 · 0 comments

Comments

@oem
Copy link

oem commented Jan 25, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant