-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add prediction type to return the mean, variance, and mode #21
base: master
Are you sure you want to change the base?
Conversation
0bf9342
to
7d2fe63
Compare
@neverfox Thanks for the PR. Before merging, can you please
|
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.
@neverfox Thanks for the PR.
Before merging, can you please
- include try also for the mean and variance in case one or all of them are not available
- rename properties and pred_props to moments and pred_moments, also in the docstrings, since this is more understandable
- add an example notebook, e.g., for the Gaussian and include the properties in the prediction section
No problem. I think it cleaner at this point to move the logic to a |
Thanks for the suggestions. |
I was wondering that if the variance or mode are not available in the distribution class, we can also infer them from the predicted samples. Can you add this maybe. |
Sure. It might make sense to make that behavior explicit so the user knows what they're getting?
Jul 1, 2023 8:22:19 AM Alexander März ***@***.***>:
…
I was wondering that if the variance or mode are not available in the distribution class, we can also infer them from the predicted samples. Can you add this maybe.
—
Reply to this email directly, view it on GitHub[#21 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AAZQNIJLGMWT5KXW7RHN4ULXOAI7FANCNFSM6AAAAAAZXOQ3HM].
You are receiving this because you were mentioned.[Tracking image][https://github.com/notifications/beacon/AAZQNIKJCMPO2CG4HLXSGZLXOAI7FA5CNFSM6AAAAAAZXOQ3HOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTAKBXKO.gif]
|
Yes, please make sure to adjust the function description to make it clear and self-contained. |
7d2fe63
to
17cbe81
Compare
Thank you for implementing the changes! I am currently in the process of completing the unit tests in the upcoming weeks. Once they are finalized, you can modify them accordingly to include a unit test for your specific changes. We can then merge the PR. |
can you please also add unit-tests for your function, thanks. |
Additionally, this change avoids unnecessary sampling if the prediction type doesn't need it.
17cbe81
to
0c2e7f6
Compare
The mode is only included if the underlying distribution implements it (e.g. zero-inflated does not). Additionally, this change avoids unnecessary sampling if the prediction type doesn't require it. Raises a ValueError for invalid prediction type for Expectile distribution.