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.114942529
0.068965517
0.068965517
0.034482759
0.022988506
0.022988506
0.022988506
0.022988506
I've already tried what this answer proposed, and I'm using Python 3.4.
import scipy.stats as s
import numpy as np
from scipy import stats
def weib(x,n,a):
return (a / n) * (x / n)**(a - 1) * np.exp(-(x / n)**a)
data = np.loadtxt("data1.csv")
print(data)
(loc, scale) = s.exponweib.fit_loc_scale(data, 1, 1)
print('loc is: ',loc, '\n scale is: ', scale)
This gives me the following output:
[0.02298851 0.1149425