4
$\begingroup$

I am working on a time series forecasting problem involving high-frequency data (hourly or every 10-15 minutes), such as energy consumption or other IoT device metrics. My goal is to predict the energy consumption, for example, for the next day (or possibly a shorter horizon, depending on feasibility).

In the past, I have used LSTM neural networks for a similar problem, but this time, I want to take a more systematic approach. My goal is to experiment with different models to identify the one that best fits my use case.

Currently, I have data spanning a few months. I am debating whether to use this dataset for testing the models or to utilize a similar dataset from Kaggle that covers several years. Since the data I aim to forecast exhibits high seasonality, having more data seems beneficial. I checked both ADF test and ACF plot and saw that the data is stationary and has high seasonality.

The dataset I have includes the following variables:

  • Timestamp
  • Energy consumption
  • A few other electricity-related variables

Due to the high seasonality of the data, I am considering adding features such as the day of the year, hour of the day, and day of the week. My exploratory data analysis suggests these features significantly affect the data, especially the hour of the day. Adding these features would convert the problem from univariate to multivariate forecasting, which could influence the choice of models. The models I am currently considering are either XGBoost or a deep learning model.

Finally, I am contemplating how to maintain the model in production. After training and deploying the model, should it be periodically retrained with new data to incorporate more context? If so, what is the recommended frequency for retraining?

I understand that some of these questions may not have definitive answers for every use case, but I would greatly appreciate any advice. If you have references or resources that could help, I’d be glad to explore them.

$\endgroup$

1 Answer 1

4
$\begingroup$

Lots of questions here. I recently wrote an answer here that addresses many of your points: https://stats.stackexchange.com/a/658061/1352. Regarding the points not addressed there:

Due to the high seasonality of the data, I am considering adding features such as the day of the year, hour of the day, and day of the week. My exploratory data analysis suggests these features significantly affect the data, especially the hour of the day. Adding these features would convert the problem from univariate to multivariate forecasting

First off, see that earlier answer of mine and a link therein as to why you should not use the hour of the day. Second: no, this is not multivariate forecasting, since you don't need to forecast the timestamps you want to feed in as predictors; you know them. In particular, your variable of interest, electricity consumption, does not influence these features.

If you used a feature like the weather, that would be a different topic, since here you would indeed need to forecast the future weather, and not use the actual weather in training (which would simulate certainty you don't have). Yet another situation would be cases where your target variable influences the feature, which might happen if you used electricity prices if they were set based on consumption.

After training and deploying the model, should it be periodically retrained with new data to incorporate more context? If so, what is the recommended frequency for retraining?

Yes, typically one would retrain the model regularly. If not, this would just turn into a longer and longer range forecast based on today's model, which will likely get worse over time.

As to how often you want to do this, that depends. If you can set up a pipeline for daily retraining, by all means do so, or even more often. If your retraining alone takes three days, you will either need three models in parallel to retrain every day, or simply retrain every third day. It's a simple cost-benefit comparison: retraining costs resources: computing power and storage, but also data scientist time and effort, for setting up more complicated pipelines or for retraining by hand. It will also depend very much on whether you stick with a model configuration and architecture and simply fit this to new data, or whether you periodically want to reconsider the configuration, possibly add new features etc. And all these costs need to be balanced against the improvement in accuracy, and more precisely, against the value this improved accuracy brings - because forecast accuracy by itself may win you competitions, but will not create value.

You might be interested in Resources/books for project on forecasting models.

$\endgroup$
1
  • $\begingroup$ Thanks a lot for your answer. It is really helpful and gave me a clearer path forward. $\endgroup$
    – pato
    Commented Dec 4 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.