[BUG] Fix Levy distribution to conform with scipy interface#880
Conversation
Levy distribution to conform with scipy interface
|
There were a lot of spurious methods. I removed them, the distribution is hopefully fixed now. |
|
Hi @fkiraly! Thank you for jumping in and cleaning that up . |
|
Is there anything else you'd like me to address before this PR is ready . Happy to update tests, docs, or anything else needed! |
|
Hi @fkiraly! I noticed after your cleanup that the base class was still BaseDistribution — changed it to _ScipyAdapter so that _get_scipy_object and _get_scipy_param work correctly. All 65 Levy tests passing now
|
|
Changed this
to this
in this file skpro/distributions/levy.py |
|
Hi @fkiraly soon will fix to pass the test case. Inform you when is done . |

Description:
Fixes #879
What was broken:
Levy.__init__manually wrote toself.__dict__["loc"]andself.__dict__["scale"]after the property setters already ran. This caused split-state — after
set_params(),the property returned the updated value but
__dict__retained the stale constructorvalue.
sklearn.clone()silently returned the wrong parameters.What this PR does:
__dict__manipulation entirely@property/ setter boilerplate forlocandscaleloc→muto avoid conflict withBaseDistribution's reservedlocpropertyNormalandLaplacein the codebaseTests: