1

I'm converting a Matlab code into a Python version. The Matlab code uses the Maximum Likelihood Esistamtion mle function to fit to a set of samples a Rayleigh and Rice distribution.

It then uses the pdf function to compute the values of the pdf (given the estimated parameters) at some points.

The equivalents in Python are the scipy.stast.rayleigh/rice.fit functions. Problem is that for example the Rayleigh one in Python is the standardized version that return both a location and scale parameter whereas the Matlab mle returns only the scale parameter. Similar for the Rice case, Python version return 3 parameters whereas Matlab only two (as per definition of the Rice distribution).

I know that for the normal distribution location = mean and scale = variance so I was expeceting that for Rayleigh the scale in Mtalb is the same as the scale in Python but it seems they are used differently. The problem obviously propagate when I use the parameters in my code since I do not have a 1to1 match,

Is there a way to have in Python the same "behavior" as in Matlab?

Sorry for the silly question but the Scipy documentation, to my opinion, is not very complete.

Thank you

4

0 回答 0