2

I am trying to estimate the error/uncertainties in the estimation of the power-law fitting parameters (m, n, b) of the form y = m(x-b)^n, which I fitted to a dataset. When I use the Nelder-Mead method from scipy.optimize.minimize I get a final simplex instead of a hess_inv output. I would like to know how to make use of this output to estimate the error/uncertainties of the output parameters.

The output gotten from using the Nelder-Mead method in the scipy.optimize.minimize is as follows:

 final_simplex: (array([[ 1.55654908e+05, -4.07968007e-01,  8.77754647e-03],
       [ 1.48986925e+05, -4.02001971e-01,  8.78807346e-03],
       [ 1.45901136e+05, -3.99397548e-01,  8.77251338e-03],
       [ 1.54536008e+05, -4.08305325e-01,  8.76484118e-03]]), array([0.12402099, 0.12527722, 0.12545908, 0.12566021]))
           fun: 0.1240209890015327
       message: 'Maximum number of function evaluations has been exceeded.'
          nfev: 600
           nit: 348
        status: 1
       success: False
             x: array([ 1.55654908e+05, -4.07968007e-01,  8.77754647e-03])
nebula1
  • 71
  • 4
  • well, with `n` parameters you have `n+1` points, while you need `n * ( n + 1 ) / 2` for the Hesse. In general it is, therefore, not possible to calc the Hesse, which you need to get the cov-matrix, right? But having your solution, you could try to get the Hesse in an additional numerical step....I know, not what you had in mind. – mikuszefski Jun 02 '20 at 08:44
  • How can I get the Hessian matrix from the current solution? – nebula1 Jun 03 '20 at 09:34
  • ...you have to make the numerical second order derivative with respect to your fitting parameters....and---oh dear---my formula from above is wrong as you need 3 points for a second order derivative; so it is even worse. – mikuszefski Jun 03 '20 at 12:38

0 Answers0