Thread Subject: multiple dataset peak fiiting with shared parameters

Subject: multiple dataset peak fiiting with shared parameters

From: Sandrine

Date: 24 Nov, 2009 14:16:04

Message: 1 of 4

Hello,
i need to fit a quite large pannel of data (about 700 spectra of 400 points), which i want to fit using 3 gaussian peaks and a baseline.
 I would like the center and width of the gaussian to be shared for the 700 spectra, and obtain for each spectrum the intensity of each peak and a value of baseline.
The amount of variables to optimize the fit is quite important: 3x (center +position) + 700*3*intensity +700*baseline
i did the fit on only one spectrum at the time using fminsearch and it works quite weel, but it is completly inappropriate for large datasets due to the time it needs to converge...
do you have an idea? or know of already developped routines for what i think is a quite common problem for spectroscopists?
Thanks for your help.

Subject: multiple dataset peak fiiting with shared parameters

From: Matt

Date: 24 Nov, 2009 16:13:19

Message: 2 of 4

"Sandrine " <savillette@yahoo.com> wrote in message <hegpr4$jnd$1@fred.mathworks.com>...
> Hello,
> i need to fit a quite large pannel of data (about 700 spectra of 400 points), which i want to fit using 3 gaussian peaks and a baseline.
> I would like the center and width of the gaussian to be shared for the 700 spectra, and obtain for each spectrum the intensity of each peak and a value of baseline.
> The amount of variables to optimize the fit is quite important: 3x (center +position) + 700*3*intensity +700*baseline
> i did the fit on only one spectrum at the time using fminsearch and it works quite weel, but it is completly inappropriate for large datasets due to the time it needs to converge...
==================

You might try fminspleas.m from the file exchange.

http://www.mathworks.com/matlabcentral/fileexchange/10093-fminspleas

The thing that might make it appropriate here is that you really have only 6 intrinsically non-linear parameters ( the 3 Gaussian widths and positions). The remaining parameters (the intensity and baseline parameters) are intrinsically linear and can be solved for very quickly given fixed, known values for the widths and positions. Add to that that the linear system that you get when the Gaussian widths/positions are held fixed is quite sparse.

In addition to fminspleas, you can could probably code your own version of Coordinate Descent (alternatingly minimizing with respect to the linear parameters and the non-linear ones) and exploit these same considerations.

Subject: multiple dataset peak fiiting with shared parameters

From: Sandrine

Date: 24 Nov, 2009 16:45:26

Message: 3 of 4

Thanks a lot!
i will try fminspleas, it really seems to be THE answer to my problem

Subject: multiple dataset peak fiiting with shared parameters

From: Matt

Date: 24 Nov, 2009 17:16:21

Message: 4 of 4

"Sandrine " <savillette@yahoo.com> wrote in message <heh2j6$4me$1@fred.mathworks.com>...
> Thanks a lot!
> i will try fminspleas, it really seems to be THE answer to my problem

Bear in mind that it is only lucky if fminsearch and/or fminspleas, give good results. There is no convergence theory supporting these algorithms for more than 1 non-linear unknown parameter.

Therefore, fminspleas might not solve your problem, let alone be THE answer to it.

Since you say fminsearch worked well enough for you, it's a good gamble that fminspleas will as well, but realize that there are more theoretically substantiated algorithms out there.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
fitting Sandrine 24 Nov, 2009 09:19:04
peak Sandrine 24 Nov, 2009 09:19:04
rssFeed for this Thread

Contact us at files@mathworks.com