mdhaber / scipy

Scipy library main repository
http://scipy.org/scipylib/
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

MAINT: raise a warning when `loguniform.fit` or `reciprocal.fit` is called #81

Closed tirthasheshpatel closed 2 years ago

tirthasheshpatel commented 2 years ago

Reference issue

scipy#15889

What does this implement/fix?

Raise a UserWarning when the fit method of the loguniform and reciprocal distributions is called. Instead of deprecating the loguniform and reciprocal distributions, I think moving users away from the [loguniform|reciprocal].fit method is more user friendly. loguniform and reciprocal still provide useful functionality and canonical parametrization for new users or users who don't use the fit method.

mdhaber commented 2 years ago

OK. You mention not deprecating the loguniform and reciprocal distributions. Would you like to include those changes here?

tirthasheshpatel commented 2 years ago

Would you like to include those changes here?

I have my final project presentation tomorrow so I won't be able to get back to this until the day after tomorrow. Meanwhile, feel free to make the changes and push this change to your main branch if you agree that we should not deprecate loguniform and reciprocal distributions. Thanks!

mdhaber commented 2 years ago

if you agree that we should not deprecate

Haha I don't think we should have to create an entirely new distribution to offer an alternate parameterization, and I don't think distributions should have to use the loc/scale parameterization if it's not natural. I guess this just serves as a reminder of why gh-15928 is important. So sure, let's leave loguniform and reciprocal without deprecation.

This can wait a little longer. I just want to get it into 1.9.0, so let me know if you'd have trouble getting to it in time for branching.

Best wishes on your presentation @tirthasheshpatel!

tirthasheshpatel commented 2 years ago

Best wishes on your presentation @tirthasheshpatel!

Thanks @mdhaber :smiley:

tirthasheshpatel commented 2 years ago

Thanks for all the changes @mdhaber!