llSourcell / How-to-Predict-Stock-Prices-Easily-Demo

How to Predict Stock Prices Easily - Intro to Deep Learning #7 by Siraj Raval on Youtube
772 stars 590 forks source link

Cannot get the result as yours ... #4

Closed ckl8964 closed 7 years ago

ckl8964 commented 7 years ago

Hi,

I run this demo code in my ubuntu 16.04.2 installed with tensorflow 1.0, keras 2.0.2 and python 2.7.12. Everything runs fine without error and warning, all console printout are similar to yours. However, the output prediction diagram is quite different from yours.

All those prediction lines are just pointing upwards of nearly the same slope.

What's wrong with it ? Thanks.

Steviey commented 7 years ago

I got the same effect on Windows. Then I deleted all cached folders in project root, extracted the source files again and clicked "Kernel > Restart & Run All" in the browser. The effect disappeared. Since I made some other modifications, not 100% sure whether this was the real fix.

ckl8964 commented 7 years ago

I deleted the only intermediate files lstm.pyc and restarted the linux to run it again. I found the result was different every time !! Would you mind to share what modification you made for it ? Thanks.

Steviey commented 7 years ago

It's all here --> https://github.com/llSourcell/How-to-Predict-Stock-Prices-Easily-Demo/issues/3 (Chapter: Update/Solution)

ckl8964 commented 7 years ago

ummm ... it is the problem related to running under Windows and python version 3.x.

I run it under linux and python 2.7 which should be perfect to those codes.

Steviey commented 7 years ago

I got it again and illustrate the effect here: https://github.com/llSourcell/How-to-Predict-Stock-Prices-Easily-Demo/issues/3

ckl8964 commented 7 years ago

Yes, we got similar results.... hope someone could help ..

Steviey commented 7 years ago

There is a possible explanation about it. The feed is randomly shuffled. Take a look at our win.-thread.