I use scipy.stats.expon.fit(data)to match the exponential distribution over my data. This seems to return two values, where I would expect one. The online documentation doesnβt seem to say what it returns fit(), but looking at the source, I assume this is a location and scale parameter. Can you set the location parameter to 0when fitting?
scipy.stats.expon.fit(data)
fit()
0
In a call, expon.fituse floc=0:
expon.fit
floc=0
In [5]: data = expon.rvs(0, 1.5, 1000) In [6]: loc, scale = expon.fit(data, floc=0) In [7]: scale Out[7]: 1.4878030368336586 In [8]: loc Out[8]: 0