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

[ENH] Multivariate normal probability distribution #375

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bhavikar04
Copy link
Contributor

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
  • I've added myself to the list of contributors with any new badges I've earned :-)
    How to: add yourself to the all-contributors file in the skpro root directory (not the CONTRIBUTORS.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 plus code if you also fixed the bug in the PR).maintenance - CI, test framework, release.
    See here for full badge reference
  • [x ] The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.

Comment on lines 11 to 12
from skpro.distributions.base import BaseDistribution
class Multivariate_Normal(BaseDistribution):

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

Copy link
Collaborator

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

Copy link
Collaborator

@fkiraly fkiraly left a 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

@bhavikar04
Copy link
Contributor Author

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?

@fkiraly
Copy link
Collaborator

fkiraly commented Jun 15, 2024

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.

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