FateMurphy / CEEMDAN_LSTM

CEEMDAN_LSTM is a Python project for decomposition-integration forecasting models based on EMD methods and LSTM.
MIT License
205 stars 42 forks source link

Error about the data type #15

Open chenghan710 opened 11 months ago

chenghan710 commented 11 months ago

I'm trying to use CEEMDAN_LSTM to predict time series

image

the code report the AttributeError: Can only use .str accessor with string values!

How can I fix this problem

image

And one more question, can I predict more than one out-of-sample value by CEEMDAN_LSTM ?

FateMurphy commented 11 months ago

(1) For problem 1: Can only use .str accessor with string values! A: you can try to set the encoding='utf-8' (2) Predict more than one out-of-sample value by CEEMDAN_LSTM A: set DAY_AHEAD=2 or larger, 1 means one-day-ahead

chenghan710 commented 11 months ago

Thanks for replying, the first question was solved, for the problem(2), the two output is I set DAY_AHEAD as 2, 3 image It seems only predict for one day, here is my code image Is there something wrong?

FateMurphy commented 11 months ago

For multi-step prediction, you can try the rolling forecasting method.

chenghan710 commented 11 months ago
image

I tried the rolling forecasting method, the error was reported

image

I've update pandas to the newest version

FateMurphy commented 11 months ago

You can try to set REDECOM_LIST = None firstly. If the error still exists, please let me know and I will fix this error later.

chenghan710 commented 11 months ago

The error still exist

chenghan710 commented 10 months ago

Sorry, here is another question

I used multiple_keras_predict and set run time=20, and NEXT_DAY=TRUE

image

Is this mean that it will predict the value of 20 days in the future?

e.g. I run this code at 9/1, it will predict the value until 9/21?

FateMurphy commented 10 months ago

It means that the code forecast the last data point, eg. 9/1, 20 times by respective method.

chenghan710 commented 10 months ago

So if I want to predict the value of 20 days in the future, it can only use rolling forecasting method?

FateMurphy commented 10 months ago

In this code, yes. In fact, the rolling forecasting method means running one-day-ahead forecasting multiple times with changing the dataset. Or, you can find other codes directly to make sequence forecasting.

chenghan710 commented 10 months ago

It is OK for me to running one-day-ahead forecasting multiple times with changing the dataset, but I still have the same error for running rolling forecasting method