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] Pareto distribution #396

Merged
merged 5 commits into from
Jun 22, 2024
Merged

[ENH] Pareto distribution #396

merged 5 commits into from
Jun 22, 2024

Conversation

sukjingitsit
Copy link
Contributor

Reference Issues/PRs

Addresses #22 for the Pareto distribution

What does this implement/fix? Explain your changes.

Implements some methods for the Pareto distribution

Does your contribution introduce a new dependency? If yes, which one?

No

What should a reviewer concentrate their feedback on?

Current state of code, and how to add energy

Did you add any tests for the change?

No

Any other comments?

No

PR checklist

For all contributions
  • [Yes] 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
  • [Yes] 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.
For new estimators
  • [NA] I've added the estimator to the API reference - in docs/source/api_reference/taskname.rst, follow the pattern.
  • [NA] I've added one or more illustrative usage examples to the docstring, in a pydocstyle compliant Examples section.
  • [NA] If the estimator relies on a soft dependency, I've set the python_dependencies tag and ensured
    dependency isolation, see the estimator dependencies guide.

@fkiraly fkiraly changed the title [ENH] Added pareto.py [ENH] Pareto distribution Jun 17, 2024
@fkiraly fkiraly added enhancement module:probability&simulation probability distributions and simulators interfacing algorithms Interfacing existing algorithms/estimators from third party packages implementing algorithms Implementing algorithms, estimators, objects native to skpro and removed interfacing algorithms Interfacing existing algorithms/estimators from third party packages labels Jun 17, 2024

Parameters
----------
xm : float or array of float (1D or 2D), must be positive
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xm is as it is on wikipedia, but I think it is confusing since there is another parameter x, below. Shall we name it scale instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that would be nice. I just used the Wikipedia convention initially as different websites had different names for these two parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have implemented the parameter name change from xm to scale, and updated the docstring as such

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have added the CDF to the docstring for clarity

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.

Looks good. May I request a parameter rename, as above?

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.

Not blocking, but it would be great if you could add explicitly cdf or pdf in the docstring, so it is clear which parameterization this class is using.

You can see examples for this in other classes.

@fkiraly fkiraly merged commit 76f33f7 into sktime:main Jun 22, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement implementing algorithms Implementing algorithms, estimators, objects native to skpro module:probability&simulation probability distributions and simulators
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants