impedance.py icon indicating copy to clipboard operation
impedance.py copied to clipboard

Error Analysis

Open ghost opened this issue 4 years ago • 3 comments

ghost avatar Aug 26 '20 21:08 ghost

Hi @Gold247, sorry we didn't get back to you quickly. Your original post about including other error analysis metrics seems valuable to me. Feel free to reopen this issue if you see fit.

BGerwe avatar Aug 28 '20 23:08 BGerwe

Just wanted to re-add the original thoughts on error analysis:

Hello all, First i want to appreciate y'all for this wonderful package. I'd like to ask if its possible to further develop the error analysis aside the standard error to include the following; chi-square, reduced chi-square, Akaike info criteria, Bayesian info criterion and the correlation matrix between the fitted parameters.

I think adding additional outputs to the fitting results could be a great addition to the project (I think one big opportunity we're still missing that we've always talked about is a good way to do model selection or comparing across models/fits). It's also worth thinking about changing the fitting routine to something like lmfit if it makes sense...

mdmurbach avatar Sep 15 '20 16:09 mdmurbach

In one of the examples the error of the fit is calculated with the absolute value in the denominator:

res_meas_real = (Z - meas_model.predict(f)).real/np.abs(Z) res_meas_imag = (Z - meas_model.predict(f)).imag/np.abs(Z)

Would't it make more sense to calculate the complex errors with respect to the real and imaginary part in the denominator as follows:

res_meas_real = (Z - meas_model.predict(f)).real/np.real(Z) res_meas_imag = (Z - meas_model.predict(f)).imag/np.imag(Z)

radmaker avatar Feb 08 '21 13:02 radmaker