I have a set of data points distributed like a bell-shape curve with varying amplitudes and widths. I need to parameterize these data points and a Gaussian with amplitude, width and offset parameters function is just perfectly suited.
My y-values are defined between at 8 different points between [-2.3561 3.1415] and I am interested fitting a Gaussian that is centered at 0.
out = amp.*exp( - (0.5*(X./sd).^2 )) + offset;
Optimizing the likelihood function following an initial estimation of these 3 parameters works generally very good. And this has been already discussed elsewhere in this site.
The problem starts when my data points are described by a very shallow bell-shaped profile, looking like a second order polynomial with a small coefficient, so that the highest and lowest points do not have so much of a difference.
In these cases the optimization procedure returns extremely high sigma and amplitude values. It basically tries to fit the data with the tip of an amazingly wide Gaussian, which by far exceeds the range of my x-values. These huge fitted values destroy my statistics, because ultimately I would like to do some statistics with these numbers comparing different groups. In these situations, I would like to have a small amplitude and relatively wide width parameter returned from the optimization procedure and this would just do the job good enough.
I tried constrained optimization, trying to limit valid values for the parameters. But this also results in values that are densely accumulated on the boundary limits.
I was wondering what would be a general approach to tackle this kind of situations? If you have encountered similar situation I would be happy to hear about your experience...
Here are some examples of data: Gray Curve: Initial Estimates Red Curve: Fitted Gaussian Blue Curve: Data
data_01: This shows a situation where sigma and amp parameters are huge, even though a very small amplitude value would do the job good.
-2.3562 1.2210
-1.5708 -1.6224
-0.7854 -0.1330
0 -0.1126
0.7854 -0.0745
1.5708 1.8017
2.3562 -0.1533
3.1416 -0.9268