View Single Post
  #9   Report Post  
Dana DeLouis
 
Posts: n/a
Default

Hi. I most likely am wrong, but I've never had much success with a LSQ
fitting of data using Solver. My experience is that Solver gives up very
quickly if it senses any type of confusion. However, others may have had
success with it. I have been looking for a good workaround though.
Here's the issue as I've seen it. Say Solver is trying to minimize the LSQ
on 1 data point in this simple example...

(x - 7)^2

Say its first guess is 13, with a returned value of 6^2, or 36.

It's next guess is 8.9, with a returned value of 3.61.

Solver senses it's getting closer by moving in a decreasing direction.

It next tries 5, but gets a retuned value of 4. This is a reversal of
direction, so it thinks that was the wrong direction, and its next guess
will be somewhere between 8.9 and 13.

Of course, its next guess is also in the wrong direction. Solver doesn't
know which way to go now, and gives up!

With many data points also doing course reversals, I've found that it's just
too hard for Solver. Solver is incapable of continuing its search for the
correct local minimum.

In general, that's why one can not use functions like IF, Max, etc within a
Solver model.

=IF(A1<7,3,4)

Solver tries 10 in A1 and gets a return value of 4. Try's a value of 12,
and also gets a return value of 4. The equation that it uses for its next
guess doesn't make sense, so it gives up. However, Solver is capable of
tracking this decision with a Boolean constraint because that algorithm is
built in.
Anyway, the above is just my opinion of course. :)
--
Dana DeLouis
Win XP & Office 2003


"Jerry W. Lewis" wrote in message
...
What is your evidence that Solver gets confused by functions that can't go
negative (since that would impact all kinds of minimizations)? I have
always assumed that the issue was that the defaults are set way too
loosly.

I have not looked hard for alternate settings that would work in one pass,
but if delta is the quantity that I am trying to minimize, I can usually
improve the initial solution with a second pass to minimize c*delta, where
c is suitably large (say 10^5).

Jerry

Dana DeLouis wrote:

Hi. If your data on the x-axes is evenly spaced out, Excel has a Fourier
Transform function under Data | Analysis. However, it's a Radix-2
algorithm only.
My opinion is that Solver can not do a LSQ very well, especially with
more than just a few data points. I've never had much success with a LSQ
fitting. The main problem is that by definition, one is squaring the
error, so the "error" never goes negative. This confuses Solver. With
multiple values, Solver gets confused, and will quickly give up.