PDA

View Full Version : gaussian model


h00zah
Oct27-10, 06:05 PM
If given a set of data points, how do I find a,b,c to input into a gaussian model?

y = a exp (-(x-c) / b)2

I know it's centered at x=c
Intersects at (0,a), but if the data doesn't have a "0", how do you find it?
Also, a controls the height, but in what way? and b controls the spread, but in what way?

Or do I have this completely wrong?

I figured at (0,a) it would be the max height because a controls height, but that means a=c because c=center where y is at its maximum height, so that doesn't make sense.

Petr Mugver
Oct28-10, 02:18 AM
This could be an idea: given your gaussian y(x) which depends on the three (for the moment arbitrary) constants a, b and c, evaluate it at the x's of your data. Then calculate

f(a, b, c) = (y1 - y(x1))^2 + (y2 - y(x2))^2 + ...

where (x1, y1), (x2, y2), ... are you data points.
Finally, choose a, b and c in such a way to minimize f.