Skip to content

[BUG] burr iii implementation was using the wrong scipy method#953

Open
hrshx3o5o6 wants to merge 1 commit intosktime:mainfrom
hrshx3o5o6:bugfix/burr-iii-implementation
Open

[BUG] burr iii implementation was using the wrong scipy method#953
hrshx3o5o6 wants to merge 1 commit intosktime:mainfrom
hrshx3o5o6:bugfix/burr-iii-implementation

Conversation

@hrshx3o5o6
Copy link

Reference Issues/PRs

Fixes #952

What does this implement/fix? Explain your changes.

This PR fixes a critical bug in the BurrIII distribution class where it incorrectly wrapped scipy.stats.burr12 (Burr Type XII) instead of scipy.stats.burr (Burr Type III).

Changes made:

  • Updated BurrIII._get_scipy_object to return scipy.stats.burr.
  • Updated BurrIII to correctly accept both the c and d shape parameters (previously, d was hardcoded to 1).
  • Updated the math docstring and parameter descriptions to reflect the two shape parameters.
  • Expanded get_test_params to thoroughly test cases where d != 1.0.

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

No new dependencies.

What should a reviewer concentrate their feedback on?

  • Correctness of the mathematical documentation in the docstring.
  • Confirming that scipy.stats.burr behaves as expected with the new c, d, and scale mapping logic.

Did you add any tests for the change?

Yes, the existing generic test suite test_all_distrs.py thoroughly verifies the new parameters generated by the updated get_test_params class method.

Any other comments?

N/A

PR checklist

For all contributions
  • I've added myself to the list of contributors with any new badges I've earned :-)
  • 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.

@fkiraly fkiraly added bug module:probability&simulation probability distributions and simulators labels Mar 21, 2026
@fkiraly fkiraly changed the title [BUG] - bugfix/burr iii implementation [BUG] burr iii implementation was using the wrong scipy method Mar 21, 2026
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!

By accident, this Pr seems to contain another one with unrelated content - can you please fix that?

@hrshx3o5o6 hrshx3o5o6 force-pushed the bugfix/burr-iii-implementation branch from 5bfbfd9 to ff86881 Compare March 22, 2026 08:38
@hrshx3o5o6 hrshx3o5o6 requested a review from fkiraly March 22, 2026 08:39
@hrshx3o5o6
Copy link
Author

Thanks for flagging that! I've cleaned up the branch now so it contains the BurrIII fix alone and have requested for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug module:probability&simulation probability distributions and simulators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] BurrIII distribution incorrectly wraps scipy.stats.burr12

2 participants