jgpavez / LSTM---Stock-prediction

A long term short term memory recurrent neural network to predict forex data time series
306 stars 149 forks source link

ValueError: invalid literal for int() with base 10: 'n' #5

Open MotorCityCobra opened 6 years ago

MotorCityCobra commented 6 years ago

File "/Users/Computer/stock/LSTM2/forex.py", line 84, in read_data int(str(date)[0:-2][6:8])).weekday() for date in dates]) ValueError: invalid literal for int() with base 10: 'n' $

MotorCityCobra commented 6 years ago

Replaced line 84 on in forex.py

    days = numpy.array([datetime.datetime(int(str(date)[0:-2][0:4]),int(str(date)[0:-2][4:6]),
                int(str(date)[0:-2][6:8])).weekday() for date in dates])
    months = numpy.array([datetime.datetime(int(str(date)[0:-2][0:4]),int(str(date)[0:-2][4:6]),
                int(str(date)[0:-2][6:8])).month for date in dates])

with

days = numpy.array(pandas.Timestamp(date).weekday() for date in dates])
months = numpy.array(pandas.Timestamp(date).month() for date in dates])
MotorCityCobra commented 6 years ago

But now it's looking for some _params.npz' file
Where is this supposed to be from? Where do I get this npz file?

Not much help description in this repo