Determine Weibull parameters from data

為{幸葍}努か 提交于 2019-12-01 19:28:15

It looks like you want to use the fit method of scipy.stats.weibull_min (which is an alias for scipy.stats.frechet_r). Use the argument floc=0 to constrain the location to be 0.

In [9]: data
Out[9]: 
array([ 0.02298851,  0.11494253,  0.2183908 ,  0.11494253,  0.14942529,
        0.11494253,  0.06896552,  0.06896552,  0.03448276,  0.02298851,
        0.02298851,  0.02298851,  0.02298851])

In [10]: from scipy.stats import weibull_min

In [11]: shape, loc, scale = weibull_min.fit(data, floc=0)

In [12]: shape
Out[12]: 1.3419930069121602

In [13]: scale
Out[13]: 0.084273047253525968
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!