Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conformalized Quantile Regression for Energy Load Forecasting with Recalibration on New Data in Production #505

Closed
MaxPolak97 opened this issue Aug 6, 2024 · 2 comments
Labels
Discussion in progress Discussion ongoing between the Mapie team and the author. Documentation Type: documentation

Comments

@MaxPolak97
Copy link

Dear Community,

I am seeking some clarification regarding the use of "MapieQuantileRegressor" versus "MapieTimeSeriesRegressor". Specifically, I would like to understand when to use each of these tools.

Currently, I am working on energy load forecasting and using quantile regression to obtain prediction intervals. However, I have found conformal predictions to be quite interesting and useful for this implementation to improve performance of my model. Given the rapid changes in data due to the energy transition, my production model needs to adapt to changing patterns in the data.

My primary goal is to predict grid +/- peaks (which are the minority samples) as accurately as possible since we need to be conservative to avoid blackouts due to overloading.

  1. To achieve this, I am considering using Conformalized Quantile Regression (CQR) with a calibration set consisting of the most recent two weeks of data. This approach aims to ensure that the model's coverage reflects the latest patterns.
  2. Once my model is in production, I plan to regularly recalibrate the prediction intervals with new data to maintain the required coverage even as data patterns changes. I found the EnbPI algorithm useful for this purpose, but I have only seen it used with "MapieTimeSeriesRegressor".

Does anyone have insights or suggestions on which method would be best suited for this problem? Any advice on how to approach this would be greatly appreciated.

Thank you!

@MaxPolak97 MaxPolak97 added the Documentation Type: documentation label Aug 6, 2024
@thibaultcordier
Copy link
Collaborator

Dear @MaxPolak97 ,

Thank you for your detailed question regarding the use of MapieQuantileRegressor and MapieTimeSeriesRegressor for energy load forecasting (and sorry for the late reply). I'll break down my response into sections to provide a clear and structured answer.

Your use case: Energy load forecasting with changing patterns

You're working on energy load forecasting with rapidly changing patterns due to the energy transition. Your primary goal is to predict grid +/- peaks accurately to avoid blackouts. You're considering Conformalized Quantile Regression (CQR) with a calibration set consisting of the most recent two weeks of data.

Suggestions for your use case:

Given your goal and the changing nature of your data, I would suggest the following approaches:

1. Conformalized Quantile Regression (CQR) with regular recalibration

  • Pros: CQR allows you to adapt to changing patterns by regularly recalibrating the prediction intervals with new data. This ensures that your model's coverage reflects the latest patterns, which is crucial for your use case.
  • Cons: The main downside is that it requires retraining the model with new data, which can be computationally expensive and time-consuming.

2. EnbPI algorithm with MapieTimeSeriesRegressor

  • Pros: If retraining the model is too costly, the EnbPI algorithm can be a good alternative. It allows you to incorporate new data into the calibration process without retraining the predictive model. This can be particularly useful when the predictive model is complex and expensive to train.
  • Cons: While EnbPI doesn't require retraining the predictive model, it might not adapt as quickly to changing patterns as CQR with regular recalibration.

Final recommendation

Given your goal to predict grid +/- peaks accurately and adapt to changing patterns, I would recommend starting with Conformalized Quantile Regression (CQR) with regular recalibration. This approach allows you to adapt to changing patterns in real-time, ensuring that your model's coverage reflects the latest data.

However, if retraining the model is too costly, the EnbPI algorithm with MapieTimeSeriesRegressor can be a viable alternative. It allows you to consider the latest data in the calibration process without retraining the predictive model.

In both cases, it's important to monitor the performance of your model and recalibrate as needed to maintain the required coverage.

I hope this helps! Let me know if you have any further questions.

@Valentin-Laurent Valentin-Laurent added the Discussion in progress Discussion ongoing between the Mapie team and the author. label Oct 16, 2024
@jawadhussein462
Copy link
Collaborator

Hello @MaxPolak97,

We’re closing this issue due to inactivity, as we haven’t received a response in over a month. If you still need assistance or have more information to provide, please feel free to reopen the issue or create a new one.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion in progress Discussion ongoing between the Mapie team and the author. Documentation Type: documentation
Projects
None yet
Development

No branches or pull requests

4 participants