help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] 1st attempt at fitting a Gaussian function with GSL.


From: David Eric Miller
Subject: Re: [Help-gsl] 1st attempt at fitting a Gaussian function with GSL.
Date: Wed, 21 Dec 2005 16:22:57 -0600
User-agent: Opera M2/8.50 (Linux, build 1358)

Hi James,

You are quite correct.  I am attempting to do a Chi Squared minimization
parameter estimation.  I did not put all of the necessary pieces into
my previous email since I was just starting to figure out how to
use gsl.

If you could take a look at my last posting, I have a more complete
test program which I am trying to get working.

Thanks again.

-dave miller


On Tue, 20 Dec 2005 15:59:26 -0600, James Bergstra <address@hidden> wrote:

> >I need to fit a Gaussian function to an array of data points.
>
>What is the nature of your data? Are they just X values or X,Y pairs?

The data consists of (x, y) pairs with an associated error on y.

Ok, so you are doing what is called parametric model estimation. Your model of y-given-x is a gaussian with some parameters, and you want to know what are
those parameters.  The way to use the function minimizers to get those
parameters is to define a differentiable LOSS FUNCTION. This loss function will say for each (x,y) of data, how bad a given parameter is. You want to find the
parameter such that the total loss over all your points is the smallest.

The problem with your initial posting was that there was no loss function to be
seen, and none of the functions you wrote was the one to minimize!

A textbook on statistical inference can give you a better sense of what is going on. (check out Wasserman's "All of Statistics", or Bishop's book on neural
networks.)

James







reply via email to

[Prev in Thread] Current Thread [Next in Thread]