Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2009-07-28 03:18:11

dlong
Member
Registered: 2009-07-28
Posts: 4

Function minimization

Hi

I'm learning about fitting a curve to a set of observations. The obs, F(x), decrease (inverse?) exponentially with increasing x, so that a suitable curve has the form:

so that F(x) tends to 1 as x tends to infinity. So I need to find the best values for alpha and beta to give the best fit. I'm a little new to this so would greatly appreciate advice on how to do this. I think that I will have to use a numerical minimisation routine, but not too sure how. A quick look at a suitable one hints that I may need to supply the derivative of the function. Would I just supply the derivative w.r.t x, or differentiate w.r.t. alpha and beta also?

Any help would be great.
Cheers

Offline

#2 2009-07-28 04:20:43

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

Re: Function minimization

The gradient will tell you which way your objective function is decreasing the fastest, and is typically the way that optimization is done.  In order to help further, I would need more information.  Do you have a set of data points that you would like to fit?  Do you have an objective function?

Also, please note that as x tends to infinity, F(x) tends to alpha, not 1.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."

Offline

#3 2009-07-28 20:14:13

dlong
Member
Registered: 2009-07-28
Posts: 4

Re: Function minimization

Ooops, yes, sorry - for that equation F(x) tends to alpha, but I need it to tend to 1 for increasing x. Let's change the equation to:

My values that I'm trying to fit this to are:
x: 2.567,2.667,2.767,2.867,2.967,3.067
F(x): 1.562, 1.411, 1.287, 1.192, 1.10

with the condition as x-> inf, F(x) -> 1

From my limited knowledge, isn't F(X) my objective function? The data are observations, not generated by a formula, and the process being modelled isn't described by an empirical formula (other than the one I'm trying to fit).

When you refer to gradient, do you mean

? How do I find best values for alpha and beta?

Many thanks

Offline

#4 2009-07-28 20:51:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function minimization

Hi dlong;

You only have 5 ordered pairs. You have only provided 5 F(x) points for 6 x's. So I used the first 5 x"s.

Is the best least square fit.

Last edited by bobbym (2009-07-28 20:55:22)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2009-07-28 20:58:05

dlong
Member
Registered: 2009-07-28
Posts: 4

Re: Function minimization

Thanks Bobby.

Sorry, ignore that last x value.

I'm actually looking to learn the method for doing this, as I have many cases and many curve fits to do (the obs I've provided are just for one case).

Offline

#6 2009-07-28 21:05:57

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function minimization

Hi dlong;

Have you covered interpolation and linear algebra? The way we use for least square fits will result in an overdetermined system (more equations than unknowns). The book methods will be easier for you to learn. They are not used for industrial problems.

Last edited by bobbym (2009-07-28 21:07:34)


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2009-07-29 19:29:27

dlong
Member
Registered: 2009-07-28
Posts: 4

Re: Function minimization

Okay, thanks.

Offline

Board footer

Powered by FluxBB