Scipy: lognormal fitting

后端 未结 5 2043
渐次进展
渐次进展 2020-12-25 14:39

There have been quite a few posts on handling the lognorm distribution with Scipy but i still dont get the hang of it.

The 2 parameter lognormal is usua

5条回答
  •  失恋的感觉
    2020-12-25 15:19

    I realized my mistakes:

    A) The samples i am drawing need to come from the .rvs method. Like so: sample_dist = sp.stats.lognorm.rvs(3, loc=0, scale=np.exp(10), size=2000)

    B) The fit has some problems. When we fix the loc parameter the fit succeeds much better. param=sp.stats.lognorm.fit(samp, floc=0)

提交回复
热议问题