问题
I have a data which is the interval days of customers purchasing products. I try to estimate the shape and scale params by scipy.stat.weibull_min
But, the parameters returned from the fit function is not unique and when I try to constrain the scale param to be 1, it does not work.
Here is the three results with different ways for input:
shape, loc, scale = scipy.stats.weibull_min.fit(data,floc=1,scale=1)
#constrain scale to be 1 yellow curve
loc:1 shape:0.7318249351 scale:75.22852953
shape, loc, scale = scipy.stats.weibull_min.fit(data,floc=1, f0=1)
#constrain shape to be 1 blue curve
loc:1 shape:1 scale:90.85
shape, loc, scale = scipy.stats.weibull_min.fit(data,floc=1)
#no constrain green curve
loc:1 shape:0.7 scale:127.26
Besides, which curve best fit the original distribution?
来源:https://stackoverflow.com/questions/44022955/why-are-the-parameters-of-weibull-not-unique-for-a-given-data