maxim5 / time-series-machine-learning

Machine learning models for time series analysis
Apache License 2.0
370 stars 103 forks source link

time-series-machine-learning/predict/ensemble.py", line 29, in predict_aggregated vlog2('Predicted values:\n', changes[:, :6]) IndexError: too many indices for array #6

Open dragon28 opened 6 years ago

dragon28 commented 6 years ago

command: python3 ./run_predict.py --period=5m USDT_BTC

error output: [2018-09-13 23:34:38] Using tickers: "USDT_BTC"

[2018-09-13 23:34:38] Using period: "5m" [2018-09-13 23:34:38] Fetching USDT_BTC: https://poloniex.com/public?command=returnChartData&currencyPair=USDT_BTC&start=1536822278&end=4294967296&period=300 [2018-09-13 23:34:39] Fetched USDT_BTC (5m) Traceback (most recent call last): File "./run_predict.py", line 29, in main() File "./run_predict.py", line 20, in main result_df = predict_multiple(job, raw_df=raw_df, rows_to_predict=1) File "/home/dragon/tensorflow/time-series-machine-learning/predict/ensemble.py", line 75, in predict_multiple predictions = ensemble.predict_aggregated(df, last_rows=rows_to_predict) File "/home/dragon/tensorflow/time-series-machine-learning/predict/ensemble.py", line 29, in predict_aggregated vlog2('Predicted values:\n', changes[:, :6]) IndexError: too many indices for array

Using Python 3.5, OS Ubuntu 16.04 (64 bits), tensorflow 1.10

BennyTheDev commented 5 years ago

I have the same problem, any period lower than 2 hours is causing this. I know it is about the amount of results from Poloniex but I cannot find out why it troubles that "changes" array.