Path: news.mathworks.com!not-for-mail
From: Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Find gaussian humps in a 3D dataset
Date: Fri, 10 Oct 2008 15:47:35 -0400
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <gcobgn$6ct$1@fred.mathworks.com>
References: <galg9a$995$1@fred.mathworks.com> <galiqa$6es$1@fred.mathworks.com> <gcnsjd$qmj$1@fred.mathworks.com>
NNTP-Posting-Host: perkinsp.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1223668055 6557 172.31.57.88 (10 Oct 2008 19:47:35 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 10 Oct 2008 19:47:35 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
In-Reply-To: <gcnsjd$qmj$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:494622


Valentin Magidson wrote:

>     I have a question similar to one Thomas Clark asked (above): I have 3D scalar (intensity) field and I have to find particle centers by fitting mixed Gaussian distribution. 

Valentin, it sounds like you're fitting a (hyper)surface in the sense of a regression model, rather than fitting a probability density.  The latter is what gmdistribution is intended for, not the former.  You may want to look into using nlinfit instead, with a model function that is the sum of several Gaussians, but Gaussian distributions.  You may find

<http://www.mathworks.com/products/statistics/demos.html?file=/products/demos/shipping/stats/cfitdfitdemo.html>

helpful in that distinction, though it discusses ting in only one dimension. You will likely need to initialize nlinfit with some reasonable starting values for the components.  Such models are notorious for having many bad local minima of the sum of squares surface.

Hope this helps.

- Peter Perkins
  The MathWorks, Inc.