nredell / forecastML

An R package with Python support for multi-step-ahead forecasting with machine learning and deep learning algorithms
Other
130 stars 23 forks source link

Doubt regarding "Multiple Time Series".. #44

Open coforfe opened 3 years ago

coforfe commented 3 years ago

Hello Nick,

Thanks again for keeping your package updated and relevant.

I have a doubt regarding if your package considers the case of getting a forecast on one time series but related to many other time series. In forecast package documentation it appears as Dynamic Regression models (i.e how "US domestic consumption" is related to "US income level").

In your case of "Multiple Time Series" you indicate as a first restriction that all the time series should have the same outome.

Perhaps it is too risky to treat these other related time series as another variables to add to the end dataframe after you get the lagged cols from the main time serie. I tend to see this particular problem very related to the typical MachineLearning problem when dealing with tabular data. In this case, each col is (related TimeSerie) is a predictor , and your target variable is the time series you want to predict. I am very interested in knowing your thoughts about this.

Thanks and Kind Regards, Carlos.

nredell commented 3 years ago

Thanks. I wish that I could keep it more updated but such is life :)

I think that I follow. I've organized datasets for applied forecasting problems in a similar fashion; this results in an extra-wide dataset. In this case, yes, the other time series are just standard features.

I guess it really depends how many time series you need to forecast. If you need forecasts for the price of gold, silver, and copper, a stacked time series dataset with group-standardized prices may be the way to go. And maybe the group column gets transformed into dummy variables inside the user-created model function. With only a handful of time series in a stacked dataset, I've actually had more luck with dummy coding the groups as opposed to using embedding approaches; though, the opposite would probably be the case with, say, 30+ time series.

At some point, with enough groups and enough features, it's all really just a standard ML prediction problem. I've coded up various vector-autoregression type setups for multiple outcomes as well, but I don't know if that'll make the package. Be cool if it did.

coforfe commented 3 years ago

Hi Nick!

Thanks for your response. Well, in my case, it is what you comment at the very end. I just want to use the other timeseries to forecast another timeseries.

I do not know if you have an example about how to do that with your package or just with the idea you commented about treating this case as another ML would be enough.

Thanks again! Carlos.