The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Fitting a curve with data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

viswa21

Ireland
4 Posts

Posted - 11/07/2011 :  01:22:41 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Dear all,
I am trying to fit a curve shown in the attached file with a Gaussian-amp fitting function. I just want to fit the curve perfectly. How is this possible?? Any help would be appreciated.

PS: How to determine that Gaussian function is the one which fits perfectly??

Thanks.

please download origin file here
http://ifile.it/nh5oz2g/Bacteria spectra fit.opj

VISWANATH BAVIGADDA

Penn

China
644 Posts

Posted - 11/07/2011 :  10:16:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Whether it fits perfectly or not, it depends on your data and the fitting model you choose. You can use the Residual Sum of Squares (RSS) to judge whether the fit is perfect. A small RSS indicates a tight fit of the model to the data.

However, I see that the RSS in your project is larger than 20000, which means that the Gaussian model is not so good to fit your data. Maybe you can change to other models to have a try again. I have changed the function to GCAS, and get a better result, but still not good enough, so maybe you need to define your own model according to your data.

Penn
Go to Top of Page

viswa21

Ireland
4 Posts

Posted - 11/09/2011 :  11:39:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Penn,
I don't understand residual sum of squares, i do see regular residual, should i have to calculate the sum of squares manually and judge the fit???

Can you elaborate on what should be optimal conditions (parameters and their values) to fit curves with customized model?

I do see GCAS fits rather nicely, but residual variations gets worse than for Gaussian fit.

Thanks for lending me hand for learning some interesting things in origin.

Visu

VISWANATH BAVIGADDA
Go to Top of Page

Penn

China
644 Posts

Posted - 11/10/2011 :  05:01:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Visu,

The RSS is calculated by default. After fitting, you can find the RSS in the Statistics table of the report sheet. Of course, the RSS is not the only one method for judging the fit, you can use the method which you are familiar with.

If you define a model by yourself, maybe you need to pay more attention to two things: 1. the model should be suitable for your data. 2. provide the good initial value for each parameter. The initial values are very important for optimizing the fit. Sometimes the bad initial values will make the fitting not converged.

Penn
Go to Top of Page

viswa21

Ireland
4 Posts

Posted - 11/11/2011 :  04:14:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Penn,

I just again looked at fitting with GCAS function, but this time a little modification to the data, just normalized dependent variable between 0 to 1.

http://ifile.it/njdtr0g/Normalised bacteria spectra with GCAS.opj

Please have a look at the another project as well without normalization.

http://ifile.it/wjyu4kb/GCAS fit for bacteria spectra.opj


I do not know the theoretical background of the bacterial fluorescence to define own function to fit and also literature is little.

So would it be possible by changing some parameters value and try to minimize residual?? If yes plz let me know.

thanks
Visu



Go to Top of Page

Penn

China
644 Posts

Posted - 11/13/2011 :  9:20:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Visu,

Theoretically, it will get a good fitting result if the good initial parameter values are provided. However, in your case, it seems that the result looks good now. So, if you still do not satisfy this result, I am afraid you had better define your own model for your data.

Penn
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000