Re: Minimization Problem [message #79724] |
Tue, 27 March 2012 06:24  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Tuesday, March 27, 2012 2:52:12 AM UTC-4, IDL beginner wrote:
> Dear All,
>
>
> I need your help to solve the following problem using IDL. I need to
> come up with an efficient way to find the minimum of a function. The
> function is:
>
> F(b) = (1 / la_determ((1 - b) * la_invert(v2) + b * la_invert(v1))) /
> ((la_determ(v1) ^ b) * (la_determ(v2) ^ (1 - b)))
>
> Where v1 and v2 are given matrices and 0 < b < 1. So, what I need is
> an efficient way of finding the value b for which the F(b) is
> minimum.
>
> I know that I can calculate for example 1000 values of b and for each
> value I can find F(b) and search for the minimum. But this way is not
> efficient in terms of accuracy and execution time.
Don't throw out the grid method. Depending on your application, doing a 1D grid search may be fine. You can pre-compute LA_INVERT(V2), LA_INVERT(V1), LA_DETERM(V1) and LA_DETERM(V2). The only thing that varies with B is the outer LA_DETERM(...).
The IDL Astronomy Library has a routine which brackets 1D minima, minf_bracket.pro.
You can also do this with MPFIT, it's one equation and one unknown.
Craig
|
|
|