Re: Fitting a rational function for a set of data in two column
- From: spellucci@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Peter Spellucci)
- Date: Wed, 18 Jan 2006 18:02:42 +0000 (UTC)
In article <43ce4290$0$65728$892e7fe2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
sanju_smg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (sanju_smg) writes:
>Hi everyone
>I want to fit a rational function for a set of data in two columns x
>and y, how do i do?.
>I need to analyse the data, and fit a rational function.
> How to find Asymptote from a set of data in two column x and y.
>Thanx in advance
>
> Regards
>sanjay
>
in principle you can do that as a nonlinear least squares problem,
sum_i { y_i - (sum_{j=0 to n} a_j (x_i)^j)/(1+ sum_{j=1 to m} b_j (x_i)^j) }^2
= min_{a_0,..,a_n,b_1,..,b_m}
where I deliberately have normalized the denominator to have no zero at x=0.
of course you must decide on n and m in advance.
even better, you can transform this into a linear least squares problem by
multiplying through with the denominator :
sum_i {y_i*(1+ sum_{j=1 to m} b_j (x_i)^j)
- (sum_{j=0 to n} a_j (x_i)^j) }^2
= min_{a_0,..,a_n,b_1,..,b_m}
,
but this means that you use the denominator as a weight function for the
data points which can be quite detrimental. at least this linear least squares
case can give you an initial guess for the nonlinear least squares case
above.
there is a problem with this approach: it might turn out that the optimal
discrete least squares solution exhibits poles inside the interval of the
x_i, which occurs quite often even for modest denominator degree if the
data are noisy. hence in principle you must add the (infinite) set
of constraints
(1+ sum_{j=1 to m} b_j (x_i)^j) >=eps>0 for x in [min x_i, max x_i}
this makes it a so called semiinfinite nonlinear optimization problem
but also for this there exists ready to use software .
look in the sections "least squares" and "constrained"
at the page
http://plato.la.asu.edu/topics/problems.html
hth
peter
.
- References:
- Fitting a rational function for a set of data in two column
- From: sanju_smg
- Fitting a rational function for a set of data in two column
- Prev by Date: Numerical resolution of ian ntegral equation
- Next by Date: Re: Numerical resolution of ian ntegral equation
- Previous by thread: Fitting a rational function for a set of data in two column
- Next by thread: re:Fitting a rational function for a set of data in two column
- Index(es):
Relevant Pages
|