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

[DOC] extension template for probability distributions #23

Closed
fkiraly opened this issue Aug 23, 2023 · 0 comments · Fixed by #265
Closed

[DOC] extension template for probability distributions #23

fkiraly opened this issue Aug 23, 2023 · 0 comments · Fixed by #265
Labels
documentation Documentation & tutorials module:probability&simulation probability distributions and simulators

Comments

@fkiraly
Copy link
Collaborator

fkiraly commented Aug 23, 2023

We should write an extension template for probability distributions - possibly we may like to do this after some of the improvements in #21
which will change the extender contract slightly.

This should look similar to the sktime extension templates:
https://github.com/sktime/sktime/tree/main/extension_templates

From @Alex-JG3 in #21, it is important to highlight the interplay between the tags (what is exact/approximate?) and the option to not implement certain methods: There are four cases:

  • method must be implemented, or one out of k methods must be implemented
  • method need not be implemented as there is a default, but can be, to replace a less accuate or less efficient default

combined with:

  • method results in numerically exact return
  • method return is approximate
@fkiraly fkiraly added module:probability&simulation probability distributions and simulators documentation Documentation & tutorials labels Aug 23, 2023
fkiraly added a commit that referenced this issue Apr 23, 2024
Towards #251.

This PR refactors the probability distributions, inheriting from
`BaseDistribution`:

* adds a boilerplate layer dealing with input coercion, formatting,
indices
* extension points move from public to private under boilerplate, e.g.,
to `_pdf` from `pdf`
* an extension template is added, detailing the extension contract,
fixes #23
* distributions are now polymorphic - if all parameters are scalar, and
no index is given, behaves as a scalar. Otherwise behaves as a 2D array
distribution, as before.

Also refactors all distributions with "non-complex" signature, and also
with exception of QPD (which is subject to multiple other PRs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation & tutorials module:probability&simulation probability distributions and simulators
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant