Given a target function of this type:
<a href="http://www.codecogs.com/eqnedit.php?latex=\dpi{200}&space;y^{(i)}&space;=&space;\sum_{j=1}^{N_1}&space;\sum_{k=1}^{N_2}&space;D_j*\left&space;[&space;[\exp(-a_{j}*x_{jk}^{(i)})-1&space;]^2&space;-&space;1&space;\right&space;]" target="_blank"><img src="http://latex.codecogs.com/gif.latex?\dpi{200}&space;y^{(i)}&space;=&space;\sum_{j=1}^{N_1}&space;\sum_{k=1}^{N_2}&space;D_j*\left&space;[&space;[\exp(-a_{j}*x_{jk}^{(i)})-1&space;]^2&space;-&space;1&space;\right&space;]" title="y^{(i)} = \sum_{j=1}^{N_1} \sum_{k=1}^{N_2} D_j*\left [ [\exp(-a_{j}*x_{jk}^{(i)})-1 ]^2 - 1 \right ]"
/></a>
where D_j
and a_j
are the parameters and the summations over index j, k are not fixed in number (N_1
and N_2
may vary). For a set of input data (x, y
) (x is a 2D matrix), how to fit the parameters involved using numpy, scipy, or lmfit-py (https://github.com/lmfit/lmfit-py/blob/master/doc/intro.rst)?
There is a relevant post here Fitting a sum to data in Python, but my case seems to be a bit more complicated. Thanks for any comment!