scipy-optimize

How can optmize fitting data on thermal profile properly?

纵然是瞬间 提交于 2019-12-10 12:26:31
问题 I have tried to fit data on the high and low-temperature regime of the thermal profile, but I couldn't fit properly. According to the experiment report, there should be 3 to 4 measurement points on each level however I couldn't manage it till now due to always there are some points could be outside of thermal profile curve and ruin everything. I checked this post about optimize.curve_fit() , and I'm unsure it can help in my case to optimize it. As it is illustrated in the last picture,

Chisquare test give wrong result. Should I reject proposed distribution?

泄露秘密 提交于 2019-12-04 05:50:28
问题 I want to fit poission distribution on my data points and want to decide based on chisquare test that should I accept or reject this proposed distribution. I only used 10 observations. Here is my code #Fitting function: def Poisson_fit(x,a): return (a*np.exp(-x)) #Code hist, bins= np.histogram(x, bins=10, density=True) print("hist: ",hist) #hist: [5.62657158e-01, 5.14254073e-01, 2.03161280e-01, 5.84898068e-02, 1.35995217e-02,2.67094169e-03,4.39345778e-04,6.59603327e-05,1.01518320e-05, 1

Chisquare test give wrong result. Should I reject proposed distribution?

烈酒焚心 提交于 2019-12-02 09:32:41
I want to fit poission distribution on my data points and want to decide based on chisquare test that should I accept or reject this proposed distribution. I only used 10 observations. Here is my code #Fitting function: def Poisson_fit(x,a): return (a*np.exp(-x)) #Code hist, bins= np.histogram(x, bins=10, density=True) print("hist: ",hist) #hist: [5.62657158e-01, 5.14254073e-01, 2.03161280e-01, 5.84898068e-02, 1.35995217e-02,2.67094169e-03,4.39345778e-04,6.59603327e-05,1.01518320e-05, 1.06301906e-06] XX = np.arange(len(hist)) print("XX: ",XX) #XX: [0 1 2 3 4 5 6 7 8 9] plt.scatter(XX, hist,