-
Notifications
You must be signed in to change notification settings - Fork 47
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
[ENH] Multivariate normal probability distribution #375
base: main
Are you sure you want to change the base?
Conversation
from skpro.distributions.base import BaseDistribution | ||
class Multivariate_Normal(BaseDistribution): |
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.
It should be a space here. For that reason the pre-commit check is not passing
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.
also, class names should not contain underscores, they should be UpperCamelCase
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.
Thanks a lot, this is a very important distribution to have!
Some remarks:
- code formatting checks are failing, so the CI will not run. See here how to automate code quality: https://www.sktime.net/en/stable/developer_guide/coding_standards.html
- the multivariate distribution is a bit difficult, since the current broadcasting features do not support parameters that are matrix-shaped per row, such as the covariance matrix of the multivariate normal.
- so, the approach taken in the PR will probably not work
- it is very much related to the issue in the histogram distribution, [ENH] Histogram distribution #335. I think there might be a way to solve broadcasting for both distributions together
I see, so should I run pre-commit and create a new PR? |
No need to open a new PR - if you update the branch on your fork, the PR also gets automatically updated. |
Reference Issues/PRs
#22
What does this implement/fix? Explain your changes.
Implements a multivariate normal probability distribution class with associated methods
Does your contribution introduce a new dependency? If yes, which one?
no
What should a reviewer concentrate their feedback on?
There exists no closed or analytical form for cdf of a multivariate normal due to which ppf also cannot be computed. Have implemented a scipy wrapper for now. Additionally, yet to implement energy functionals, one source of reference is
(https://scholar.google.co.in/scholar_url?url=https://pages.stat.wisc.edu/~wahba/stat860public/pdf4/Energy/JSPI5102.pdf&hl=en&sa=X&ei=QQNiZqmfNo3A6rQP6Kmr0AI&scisig=AFWwaeYxyFKVaJ3KgQG_GOoSlG-Q&oi=scholarr)
Did you add any tests for the change?
no
Any other comments?
PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
skpro
root directory (not theCONTRIBUTORS.md
). Common badges:code
- fixing a bug, or adding code logic.doc
- writing or improving documentation or docstrings.bug
- reporting or diagnosing a bug (get this pluscode
if you also fixed the bug in the PR).maintenance
- CI, test framework, release.See here for full badge reference