Determine Weibull parameters from data

后端 未结 1 1174
余生分开走
余生分开走 2021-01-12 20:21

I would like to identify the Weibull parameters (i.e. the shape and scale) of my data.

0.022988506
0.114942529
0.218390805
0.114942529
0.149425287
0         


        
相关标签:
1条回答
  • 2021-01-12 20:46

    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
    
    0 讨论(0)
提交回复
热议问题