Curve Fitting problem (nonlinear regression)

This is a discussion on Curve Fitting problem (nonlinear regression) within the C++ Programming forums, part of the General Programming Boards category; Hi everyone!
Currently I have this nonlinear regression problem whereby I need to perform a curve fitting based on one ...

Curve Fitting problem (nonlinear regression)

Hi everyone!

Currently I have this nonlinear regression problem whereby I need to perform a curve fitting based on one whole chunk of raw data(given below).
The program has to be written in C++ which will give the equation's coefficients at the output.

How can I also minimise the error for the cure fitting process? Could anyone help to give an estimate equation for this fitting as well?

the data are correct. I also feel that there's isn't any curve that fits those data.
Actually now i intend to treat this problem as a "classification" problem. I intend to divide those data into 4 regions. So user upon entering any X and Y combi, the system will give the region(between 1-4) for that particular X and Y combi.
data set 1-22 : region 1
data set 23-68 : region 2
data set 69-195 : region 3
data set 196-228(end) : region 4

However I do not know what model/equation I should use for this classification problem. Pls advice, thanks! I'm using genetic algo as shown below:

You don't know what model/equation to use?? That must be part of the problem! If you don't have a curve to fit there is no problem. I mean if you're free to choose ANY curve you could choose the one which is piecewise constant and passes through all the points! Zero error then.

how did linear regression 'not work'? no regression model will fit your data because the relative standard deviation about any particular data point is enormous. no model will give a reasonable pearson coefficient because there is simply too much noise in the input to achieve meaningful results.

also, the polynomial model you used above is linear. linear does not mean a straight line.

further, you can also curvilinearize the input data to further extend the reach of OLS into many nonlinear systems.

if you can code up a simple linear algebra library, you can create generalized linear regression code from these articles. i did it last year.

honestly, i'm afraid that no forum is going to help you here because it seems you may have some basic misconceptions about your assignment. you seem to be grasping at straws a bit and i would honestly recommend you visit with your TA or professor to make sure you are understanding the assignment properly before proceeding further.

DavidP: Oh actually attached is the classification which I've wanted. Right now I'm trying the Taylor series expression as the 'model' but still trying to figure out. (with the top green data as region 1 down to region 4 in purple)

m37h0d: Yup due to the shortage of time, thus I do not have sufficient time to build up my knowledge in this area. In my code, I'm actually trying to input a model (trial and error) so that when user inputs any X & Y value, the program will automatically tells the user which region that set of data falls in, as simple as that.

In my code, I'm actually trying to input a model (trial and error) so that when user inputs any X & Y value, the program will automatically tells the user which region that set of data falls in, as simple as that.

This is the difference between classification and clustering.

With classification, you already have regions set in stone. When you add a new data point to the data set, it gets classified into one of the pre-existing regions.

With clustering, your given a data set, and your goal is to discover what regions may exist (but not be readily apparent) in the given data set.

Linear regression is normally a type of classification, because your regression model acts as the classifying agent.