-
Notifications
You must be signed in to change notification settings - Fork 487
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
Uncertainty: Conformal Prediction V1.1 - add Conformal class to conformal_prediction.py and rename file to conformal.py #1074
Conversation
…nd added plot_interval_width_per_timestep() method for multiple timesteps.
Model Benchmark
|
Codecov Report
@@ Coverage Diff @@
## main #1074 +/- ##
==========================================
+ Coverage 90.12% 90.13% +0.01%
==========================================
Files 21 21
Lines 4788 4796 +8
==========================================
+ Hits 4315 4323 +8
Misses 473 473
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
…nd _get_q_hat() methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a few minor comments
|
||
alpha: float | ||
method: str | ||
quantiles: list = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quantiles: list = None | |
quantiles: Optional[list] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can this be None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If None
, NeuralProphet will automatically set it to []
behind-the-scene. Then, if 0.5
doesn't exist in the input quantiles list, then NP will automatically add it to the front of the list. Therefore, default None
will become [0.5]
.
neuralprophet/conformal.py
Outdated
# import logging | ||
# from typing import Callable, List, Optional, Type, Union | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# import logging | |
# from typing import Callable, List, Optional, Type, Union |
Remove unused imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# import logging | |
# from typing import Callable, List, Optional, Type, Union | |
from typing import Optional | |
Or import Optional
for later usage
Co-authored-by: Richard Stromer <[email protected]>
Co-authored-by: Richard Stromer <[email protected]>
🔬 Background
Conformal
class task found in Issue Conformal Prediction V1.1 tasks #1017.🔮 Key changes
Conformal
class toconformal_prediction.py
, rename the file toconformal.py
, and refactor the file.📋 Review Checklist
Please make sure to follow our best practices in the Contributing guidelines.