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

Tutorial for Conformal Prediction #597

Merged
merged 5 commits into from
Aug 4, 2023
Merged

Conversation

kvnkho
Copy link
Collaborator

@kvnkho kvnkho commented Aug 4, 2023

No description provided.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@kvnkho kvnkho requested a review from AzulGarza August 4, 2023 01:00
Copy link
Member

@AzulGarza AzulGarza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @kvnkho! Thank you! I think this is really great; the approach of using models that forecast flat lines is exciting because it shows the capabilities of uncertainty estimation of conformal prediction :)

@AzulGarza
Copy link
Member

Also thanks for fixing the issue related to level and prediction intervals🤗

@AzulGarza AzulGarza merged commit 25f027b into main Aug 4, 2023
16 checks passed
@AzulGarza AzulGarza deleted the docs/conformal_prediction branch August 4, 2023 03:34
@MMenchero MMenchero self-requested a review August 7, 2023 23:21
@@ -0,0 +1,14030 @@
{
Copy link
Contributor

@MMenchero MMenchero Aug 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great tutorial! Below there are a few suggestions.


Reply via ReviewNB

@@ -0,0 +1,14030 @@
{
Copy link
Contributor

@MMenchero MMenchero Aug 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are uncalibrated, meaning that they tend to ignore seasonality.

I think we need a more accurate description of what an uncalibrated interval is. Here's a suggestion:

meaning that the actual frequency of observations falling within the interval does not align with the confidence level associated with it. For example, a calibrated 95% prediction interval should contain the true value 95% of the time in repeated sampling. An uncalibrated 95% prediction interval, on the other hand, might contain the true value only 80% of the time, or perhaps 99% of the time. In the first case, the interval is too narrow and underestimates the uncertainty, while in the second case, it is too wide and overestimates the uncertainty.

Next

Statistical methods also assume normality. Here, we talk about another method called conformal prediction that doesn't require any distributional assumptions. More information...

Reply via ReviewNB

@@ -0,0 +1,14030 @@
{
Copy link
Contributor

@MMenchero MMenchero Aug 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current version there's a problem displaying the plots.

Unable to display output for mime type(s): application/vnd.plotly.v1+json


Reply via ReviewNB

@@ -0,0 +1,14030 @@
{
Copy link
Contributor

@MMenchero MMenchero Aug 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can move this to the next section? something like "we'll plot the different intervals using matplotlib for one unique_id. To obtain the ids in the dataset use.. ". Otherwise it might look a little random.


Reply via ReviewNB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this was me finding a good ID to plot. Will just delete.

@@ -0,0 +1,14030 @@
{
Copy link
Contributor

@MMenchero MMenchero Aug 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before the references, we should include a future work and an acknowledgements section. Here are some ideas:

Future work
Conformal prediction has become a powerful framework for uncertainty quantification, providing well-calibrated prediction intervals without making any distributional assumptions. Its use has surged in both academia and industry over the past few years. We'll continue working on it, and future tutorials may include:

- Exploring larger datasets
- Incorporating industry-specific examples
- Investigating specialized methods like the jackknife+ that are closely related to conformal prediction (for details on the jackknife+ see [here](https://valeman.medium.com/jackknife-a-swiss-knife-of-conformal-prediction-for-regression-ce3b56432f4f)).

If you're interested in any of these, or in any other related topic, please let us know by opening an issue on [GitHub](https://github.com/Nixtla/statsforecast/issues)

Acknowledgements
We would like to thank [Kevin Kho](https://github.com/kvnkho) for writing this tutorial, and Valeriy [Manokhin](https://github.com/valeman) for his expertise on conformal prediction, as well as for promoting this work.

Reply via ReviewNB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok will add these!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants