[BUG] Fix Levy distribution tags: move mean/var to capabilities:undefined and add missing distr:paramtype tag#950
Open
ANANYA542 wants to merge 1 commit intosktime:mainfrom
Open
Conversation
The Levy distribution has infinite mean and infinite variance. However, it incorrectly listed 'mean' and 'var' under 'capabilities:exact' instead of 'capabilities:undefined'. This PR updates the tags dictionary to correctly report its mean and var as undefined, similar to how Cauchy handles it. It also adds the missing 'distr:paramtype: parametric' tag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Levy distribution has infinite mean and infinite variance. However, it incorrectly listed mean and var under capabilities:exact instead of capabilities:undefined. This PR corrects the tags dictionary and adds the missing distr:paramtype: parametric tag.
Reference Issues/PRs
fixes #941
What does this implement/fix? Explain your changes.
The Lévy distribution has infinite mean and infinite variance. However, skpro/distributions/levy.py incorrectly listed mean and var under "capabilities:exact". This is misleading because the values returned are simply inf — framework components relying on this tag might assume the exact calculation yields finite, usable numbers.
This PR makes three changes:
Removes mean and var from "capabilities:exact"
Adds "capabilities:undefined": ["mean", "var"], consistent with how Cauchy handles its undefined mean
Adds the missing "distr:paramtype": "parametric" tag, required for framework functions like to_df()
Does your contribution introduce a new dependency? If yes, which one?
no
What should a reviewer concentrate their feedback on?
1.Verifying the mathematical correctness of moving mean and var to capabilities:undefined
2.Confirming the tag formatting is consistent with how other distributions like Cauchy declare undefined capabilities
Did you add any tests for the change?
No new tests were added. The existing automated test framework in skpro/distributions/tests/test_all_distrs.py will automatically validate against the updated capabilities for the Levy distribution.
Any other comments?
A screenshot of the fix applied locally is attached below.

PR checklist
For all contributions
How to: add yourself to the all-contributors file in the
skproroot 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 pluscodeif you also fixed the bug in the PR).maintenance- CI, test framework, release.See here for full badge reference
For new estimators
docs/source/api_reference/taskname.rst, follow the pattern.Examplessection.python_dependenciestag and ensureddependency isolation, see the estimator dependencies guide.