Is it possible to fix parameters while fitting distributions in SciPy? For example, this code:
import scipy.stats as st
xx = st.expon.rvs(size=100)
print st.
To fix loc
, use the argument floc
:
print st.expon.fit(xx, floc=0)
E.g.
In [33]: import scipy.stats as st
In [34]: xx = st.expon.rvs(size=100)
In [35]: print st.expon.fit(xx, floc=0)
(0, 0.77853895325584932)
Some related questions: