Le 03/07/2011 14:47, jeesh a écrit :
> Hi everyone,
Hi Jeesh,
> I'm somewhat new to java, but I'm looking to build a least squares
> optimization routine for a 2D Gaussian Fit based on this link (about half
> way down) http://commons.apache.org/math/userguide/optimization.html.
>
> Just a general question  how would I go about structuring the Jacobian
> matrix for a two component function?
You can organize the rows as you want. In the quadratic example of the
user guide page you cite, the rows correspond to simply to different
measurement points. For simplicity, they have been put in x increasing
order, but they could have been put in any order. So in your case, you
could choose something like:
index 0 : (x0, y0)
index 1 : (x0, y1)
index 2 : (x0, y2)
...
index n1: (x0, yn1)
index n : (x1, y0)
index n+1: (x1, y1)
...
or the other way round:
index 0 : (x0, y0)
index 1 : (x1, y0)
index 2 : (x2, y0)
...
index m1: (xm1, y0)
index m : (x0, y1)
index m+1: (x1, y1)
...
or even a random order, and your (xi,yj) samples may even not be
regularly spaced but could be random points.
Once you have chose some ordering, you should use the same order for the
rows of the jacobian matrix and the values of the function as returned
by the respectively the jacobian method and the value method of your
DifferentiableMultivariateVectorialFunction implementation. The same
order should also be used for the target array you pass to the optimize
method of the optimizer.
best regards,
Luc
>
> Any help would be appreciated.
>
> 
> View this message in context: http://apachecommons.680414.n4.nabble.com/MathJacobianMatrixoffxytp3641890p3641890.html
> Sent from the Commons  User mailing list archive at Nabble.com.
>
> 
> To unsubscribe, email: userunsubscribe@commons.apache.org
> For additional commands, email: userhelp@commons.apache.org
>

To unsubscribe, email: userunsubscribe@commons.apache.org
For additional commands, email: userhelp@commons.apache.org
