Re: finding a function that describes an exponential series

From: Thomas Mautsch (mautsch_at_math.ethz.ch)
Date: 02/03/05


Date: 3 Feb 2005 19:33:43 +0100

In news:<ctmafv$b9o$1@nntp.itservices.ubc.ca> schrieb Robert Israel:
> Thomas Mautsch <mautsch@math.ethz.ch> wrote:
>>In news:<jyjrQcujM6iPmxdwt33AbNZm6OQO@4ax.com> schrieb Lynn Kurtz:
>>>>Rich Koup wrote:
>>>>> What are some techniques of finding a function for an exponential series?
>>>>> For ex, and just as an example, let's say I have the following sample of
>>>>> numbers (made them up):
>>>>> 1, 2, 4, 7, 11, 16, 22, 29, 36
>>>>> They seem to describe an exponential function.
>
>>> Or, probably better in some sense, you could simply do a least squares
>>> fit to your data. For example, Maple gives:
>
>>> y = 1.692547293 exp (.3598597359 t)
>
>>> as a least squares approximation using t = 1 .. 9 as your data points.
>>> Of course, a least squares fit probably doesn't exactly pass through
>>> any of the points.
>
>>Your result looks to me
>> as if you forgot the last point (9,36).
>
>>By the way, I naively asked to calculate
>
>> add( (c*exp(a*x[1])-x[2])^2,
>> x=zip((x,y)->[x,y],[$1..9],[1,2,4,7,11,16,22,29,36]));
>> Optimization[Minimize]( % );
>
> Try giving Maple reasonable intervals for a and c, e.g.
> Optimization[Minimize](%, c=0..10, a=0..1 );

Even
        Optimization[Minimize](%, a=0..infinity );

works well. - But usually,
for more complicated functions with more parameters to fit,
we don't have a clue, which intervals the optimal parameters will
lie in, at least I don't.

By the way, here is another reason why I don't like
Maple's Optimization Package:

> add( (c*exp(a*x[1])-x[2])^2,
       x=zip((x,y)->[x,y],[9,8,7,6,5,4,3,2,1],[1,2,4,7,11,16,22,29,36]));
> Optimization[Minimize](% ,a=-infinity..0);

[[22.9382009947758832, [c = 52.0681967046409184, a = -.317599154924525395]]]

> Optimization[Minimize](%%);

[[3068., [c = -38.9468332617795312, a = -352.287643116853246]]]

As if -352 wasn't negative!
On the other hand, one must think that
"Minimize" was rather made for convex optimization problems...

And here is a reason, why I just *love*
your contributions to this group: ;-)
>
> Or you could also use Optimization[LSSolve].
>
I would never have considered "LSSolve" as a command
for least square optimization, because I always thought
that the "LS" stood for "Linear System".
Thank you so much for this advice!

Regards,
        Thomas



Relevant Pages

  • Re: Asynchronous Commit in Oracle Database 10g R2
    ... this running and the database goes down for some reason in the middle ... >> oracle would use DBMS_JOB instead of extproc. ... > The optimization is only a danger if there is a method ...
    (comp.databases.oracle.server)
  • Re: Defeating Optimisation for memcmp()
    ... You need to expand your description of the problem to make that point clear; as soon as you do so, we can tell you what to do to prevent the optimization. ... The detail is simply that the code is writing to CMOS. ... The only reason I can think of for your comments is that you were assuming I wanted to check the write because I wasn't confident that memcpy was implemented correctly. ... You said that the memory being pointed at was not volatile. ...
    (comp.lang.c)
  • Re: Why No Supplemental Characters In Character Literals?
    ... "Micro-optimization" is the attempt to optimize tiny portions of the ... instructions in the innermost loop of some arithmetic procedure, ... actual optimization and was never anything other than a condemnatory ... It stands to reason that this, or something close, would be ...
    (comp.lang.java.programmer)
  • Re: Efficient Java Programming
    ... been programming in Java for about a year now so I have a reasonable ... necessarily achieving it) than for any other single reason - including blind ... Hmm - let's look at the context before deciding optimization is evil. ...
    (comp.lang.java.programmer)
  • Re: Efficient Java Programming
    ... been programming in Java for about a year now so I have a reasonable ... necessarily achieving it) than for any other single reason - including blind ... gets it right - he says premature optimization. ...
    (comp.lang.java.programmer)