Skip to content

[ENH] enhance Fisk distribution with closed-form mean/var/pdf/cdf/ppf…#806

Open
Shristimishra980 wants to merge 1 commit intosktime:mainfrom
Shristimishra980:feat/fisk-distribution-22
Open

[ENH] enhance Fisk distribution with closed-form mean/var/pdf/cdf/ppf…#806
Shristimishra980 wants to merge 1 commit intosktime:mainfrom
Shristimishra980:feat/fisk-distribution-22

Conversation

@Shristimishra980
Copy link

…, fixes #22

  • Fix docstring: correct CDF formula (removed malformed LaTeX, added proper formulas)
  • Add explicit _mean: alpha*pi/beta / sin(pi/beta) [defined for beta > 1]
  • Add explicit _var: closed-form formula [defined for beta > 2]
  • Add explicit _pdf: (beta/alpha)*(x/alpha)^(beta-1) / (1 + (x/alpha)^beta)^2
  • Add explicit _log_pdf: log of closed-form PDF
  • Add explicit _cdf: (x/alpha)^beta / (1 + (x/alpha)^beta)
  • Add explicit _ppf: alpha * (p/(1-p))^(1/beta) -- analytical closed form
  • Add full math documentation with LaTeX formulas in docstring
  • Add dedicated test_fisk.py with mean/var/pdf/cdf/ppf/log_pdf correctness tests

Reference Issues/PRs

What does this implement/fix? Explain your changes.

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

What should a reviewer concentrate their feedback on?

Did you add any tests for the change?

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

…fixes sktime#22

- Fix docstring: correct CDF formula (removed malformed LaTeX, added proper formulas)
- Add explicit _mean: alpha*pi/beta / sin(pi/beta)   [defined for beta > 1]
- Add explicit _var: closed-form formula              [defined for beta > 2]
- Add explicit _pdf: (beta/alpha)*(x/alpha)^(beta-1) / (1 + (x/alpha)^beta)^2
- Add explicit _log_pdf: log of closed-form PDF
- Add explicit _cdf: (x/alpha)^beta / (1 + (x/alpha)^beta)
- Add explicit _ppf: alpha * (p/(1-p))^(1/beta)  -- analytical closed form
- Add full math documentation with LaTeX formulas in docstring
- Add dedicated test_fisk.py with mean/var/pdf/cdf/ppf/log_pdf correctness tests
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.

[ENH] roadmap of probability distributions to implement

1 participant