maxim5 / time-series-machine-learning

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

Prediction time-frame #10

Open johnsmith1232541 opened 5 years ago

johnsmith1232541 commented 5 years ago

I might be missing something, please correct me if so but I believe this model is predicting exactly 1 step behind at all times. Whenever I look at the time of the predictions it's always in the past, including day predictions.

For example, at 5:42:

2019-06-14 05:41:48] Fetching BTC_ETH: https://poloniex.com/public?command=returnChartData&currencyPair=BTC_ETH&start=1555555555&end=4294967296&period=300
[2019-06-14 05:41:51] Fetched BTC_ETH (5m)
C:\Users\username\Desktop\time-series-machine-learning-master\time-series-machine-learning-master\util\data_util.py:74: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
  row = window.as_matrix().reshape((-1,))
[2019-06-14 05:42:04] Latest chart info:
                       close     high       low     open  quoteVolume    volume  weightedAverage
date
2019-06-14 05:35:00  0.03093  0.03093  0.030915  0.03093    34.577163  1.068963         0.030915
2019-06-14 05:40:00  0.03093  0.03093  0.030930  0.03093     0.028200  0.000872         0.030930

[2019-06-14 05:42:04] Prediction for "high":
                     Prediction  Current-Truth
Time
2019-06-14 05:40:00     0.03093        0.03093

Using the same http link just before I run the command I can see that there's that exact result at 5:40. It's not predicting ahead, it's already there. Am I missing something?

thenightisdarkandfullofterrors commented 4 years ago

Most machine learning algos will give the last price as the best prediction unfortunately