# [Needed]Curve Fitting for a a set of datas, links

Status
Not open for further replies.

#### vamanan

##### Full Member level 2
[Needed]Curve Fitting

Hi,
Can anybody explain me how curve fitting is done for a a set of datas.
You can guide me by giving links also.
Regards,
Vamanan

#### evision

##### Newbie level 3
Re: [Needed]Curve Fitting

Take an inverse of (total steps -1), raise it to the ratio of Last value/first value

#### Kral

##### Advanced Member level 4
Re: [Needed]Curve Fitting

vamanan,
Two common methods of curve fitting are polynomial curve fitting, and least squares curve fitting. In polynomial curve fitting, a polynomial is found for which each of the data points occurs on the polynomial curve. In least squares fitting, a polynomial is found for which the sum of the squares of the errors between the data points and the polynomial is minimal. See the folowing:
. http://en.wikipedia.org/wiki/Curve_fitting
. http://en.wikipedia.org/wiki/Linear_least_squares
Also, Google on l"east squares" and "polynomial curve fit". You'll get lots of hits.
Regards,
Kral

#### iyami

##### Full Member level 4
Re: [Needed]Curve Fitting

In least squares fitting, a polynomial is found for which the sum of the squares of the errors between the data points and the polynomial is minimal.

Just a small addition. These functions need not be polynomials. You may also have data which
you know is generated by a sum of sine functions or exponentials. In that case you can use
(non-linear) least-square fitting to find the best (or at least a close enough) fit among functions
of this type.

The general procedure consists of the following steps
1) decide which type of functions you want to use as candidates
2) decide how you define the distance between the data and these functions
3) find a close-enough functions from these candidates.

1) are often polynomials of a fixed degree, ration functions, sine waves etc.
2) usually l2-norm (Euclidean distance for functions)
3) there are many open source libraries/programs for linear/non-linear least square fitting

Status
Not open for further replies.

Replies
1
Views
1K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
4
Views
2K
Replies
2
Views
1K