[Insight-users] expectation maximization
Nils H. Busch
nilsb at cbs.mpg.de
Mon Jan 30 08:16:47 EST 2006
Hi,
I have been trying to use the
itkExpectationMaximizizationMixtureModelEstimator (even typing this is
hard)
for fitting a finite mixture of gaussians to a histogram of an image.
Not very successully, as at least one class's parameters are badly estimated.
Has anyone successfully used that class for this purpose and is willing to
share some ideas/tricks/caveats ?
I have looked at the example and the test code and in fact this is about
the only time EM in itk seemed to produce accurate results for me
I have created a test mixture of gaussians with
mean_1 = -2; sigma_1 = 1, mixing factor = 0.3
mean_2 = 2; sigma_2 = 1, mixing factor = 0.7
(so there is little overlap)
by using itkGaussianDensityFunction and calculating the mixture for a
certain range and feeding the values into a ListSample.
Setting initial parameters to
mean_1 = -2.1, sigma_1 = 1 mixing factor = 0.5
mean_1 = 2.1, sigma_1 = 1 mixing factor = 0.5
the outcome was
mean_1 = 0.19978 sigma_1= 0.0177377, w_1 = 0.31304
mean_2 = 0.199728 sigma_2 = 0.0177379, w_2 = 0.6801.
Not very satisfying really.
As the only input producing plausible results were from
NormalVariateGenerator, i.e not from a (weighted mixture of gaussians,
I am begining to wonder which are the requirements for the input to
itkExpectationMaximimzationMixtureModelEstimator ?
Am I overlooking something ?
I am especially unsure about the role of the mixing/proportion parameter
in this implementation.
I have been trying to estimate some examples found in the literature with
this class, but to no avail.
As a side note, I think there is a bug in
itkExpectationMaximizationMixtureModelEstimator causing it to always
return
NOT_CONVERGED flag.
In itkExpectationMaximizationMixtureModelEstimator.txx
l.320 break statement breaks only out of while loop and
and assignment m_TerminationCode = NOT_CONVERGED is always made.
I believe last line should be moved to top of function.
Also, there are some typos in
itkNumericTraitsVectorPixel.h and itkNumericTraitsTensorPixel.h :
it should say:
l. 119
typedef Vector<unsigned long, 3> PrintType;
resp.
l. 87
typedef Tensor<unsigned long, 3> PrintType;
--
Nils H. Busch
More information about the Insight-users
mailing list