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

Predition is not done for next data? #2

Open
epraveen92 opened this issue Dec 23, 2018 · 3 comments
Open

Predition is not done for next data? #2

epraveen92 opened this issue Dec 23, 2018 · 3 comments

Comments

@epraveen92
Copy link

Hi,

The prediction was only with the actual data and there is no data predicted for next few data or days.

What you done is "If the data was 1000 then the predicted also 1000".

But I'm asking is predicted data for next n number of days.

For example:
if we have 1000 data and we need to predict for next 10 days then it should be predicted for 1010 data.

@rundhik
Copy link

rundhik commented Jan 25, 2019

Hi, thanks for your project

when i try to run code I saw warning

ValueError                                Traceback (most recent call last)
<ipython-input-16-cd38cb954793> in <module>()
     35 data = pdr.get_data_yahoo("AAPL", "2017-12-19", "2018-01-03")
     36 stock = data["Adj Close"]
---> 37 X_predict = np.array(stock).reshape((1, 10, 1)) / 200
     38 
     39 print(model.predict(X_predict)*200)

ValueError: cannot reshape array of size 9 into shape (1,10,10)

What should i do?

@guilherme-maioli
Copy link

Hi, thanks for your project

when i try to run code I saw warning

ValueError                                Traceback (most recent call last)
<ipython-input-16-cd38cb954793> in <module>()
     35 data = pdr.get_data_yahoo("AAPL", "2017-12-19", "2018-01-03")
     36 stock = data["Adj Close"]
---> 37 X_predict = np.array(stock).reshape((1, 10, 1)) / 200
     38 
     39 print(model.predict(X_predict)*200)

ValueError: cannot reshape array of size 9 into shape (1,10,10)

What should i do?

I need help too with the same error

@robert-andrei
Copy link

robert-andrei commented Jun 12, 2019

Hi, thanks for your project

when i try to run code I saw warning

ValueError                                Traceback (most recent call last)
<ipython-input-16-cd38cb954793> in <module>()
     35 data = pdr.get_data_yahoo("AAPL", "2017-12-19", "2018-01-03")
     36 stock = data["Adj Close"]
---> 37 X_predict = np.array(stock).reshape((1, 10, 1)) / 200
     38 
     39 print(model.predict(X_predict)*200)

ValueError: cannot reshape array of size 9 into shape (1,10,10)

What should i do?

The solution is to change the parameters for pdr.get_data_yahoo. As it is now, in that interval are only 9 working days, so only 9 stock values. You could, for example, use the following setup:

data = pdr.get_data_yahoo("AAPL", "2017-12-19", "2018-01-04)

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

4 participants