Re: finding a function that describes an exponential series
From: Thomas Mautsch (mautsch_at_math.ethz.ch)
Date: 02/03/05
- Next message: Gianna Stefani: "Re: My Wikipedia experiment, prime counting"
- Previous message: john_ramsden_at_sagitta-ps.com: "Re: Tree Algorithm"
- In reply to: Robert Israel: "Re: finding a function that describes an exponential series"
- Next in thread: Robert Israel: "Re: finding a function that describes an exponential series"
- Reply: Robert Israel: "Re: finding a function that describes an exponential series"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Gianna Stefani: "Re: My Wikipedia experiment, prime counting"
- Previous message: john_ramsden_at_sagitta-ps.com: "Re: Tree Algorithm"
- In reply to: Robert Israel: "Re: finding a function that describes an exponential series"
- Next in thread: Robert Israel: "Re: finding a function that describes an exponential series"
- Reply: Robert Israel: "Re: finding a function that describes an exponential series"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|