santoshlite / Beibo

🤖 Predict the stock market with AI 用AI预测股票市场
MIT License
85 stars 16 forks source link

data from predict() does not return as shown #4

Open themindfactory opened 2 years ago

themindfactory commented 2 years ago

In beibo.py in def oracle(): there is a def predict(): find the lines b = b.split("array([[[") c = b[1].split("]]])") d = c[0][ : -3]

I had to change them to d = b.split('\n')[1].split(' ')[1] for some reason the output of the model.predict() was not of the format it expected...

themindfactory commented 2 years ago

Here is how it looks from pred

                  0

2021-12-31 1070.339966 2022-01-01 1070.339966 2022-01-02 1070.339966 2022-01-03 1070.339966 2022-01-04 1070.339966 2022-01-05 1070.339966 2022-01-06 1070.339966 2022-01-07 1070.339966 2022-01-08 1070.339966 2022-01-09 1070.339966 2022-01-10 1070.339966 2022-01-11 1070.339966 2022-01-12 1070.339966 2022-01-13 1070.339966 2022-01-14 1070.339966 2022-01-15 1070.339966 2022-01-16 1070.339966 2022-01-17 1070.339966 2022-01-18 1070.339966 2022-01-19 1070.339966 2022-01-20 1070.339966 2022-01-21 1070.339966 2022-01-22 1070.339966 2022-01-23 1070.339966 2022-01-24 1070.339966 2022-01-25 1070.339966 2022-01-26 1070.339966 2022-01-27 1070.339966 2022-01-28 1070.339966 2022-01-29 1070.339966 Freq: D