Add prediction type to return the mean, variance, and mode#21
Add prediction type to return the mean, variance, and mode#21neverfox wants to merge 1 commit intoStatMixedML:masterfrom
Conversation
0bf9342 to
7d2fe63
Compare
|
@neverfox Thanks for the PR. Before merging, can you please
|
StatMixedML
left a comment
There was a problem hiding this comment.
@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.