Environment for
Supported by Index-Structures

Class GaussianFittingFunction

  extended by de.lmu.ifi.dbs.elki.math.linearalgebra.fitting.GaussianFittingFunction
All Implemented Interfaces:

public class GaussianFittingFunction
extends Object
implements FittingFunction

Gaussian function for parameter fitting Based mostly on fgauss in "Numerical Recpies in C". However we've removed some small optimizations at the benefit of having easier to use parameters. Instead of position, amplitude and width used in the book, we use the traditional Gaussian parameters mean, standard deviation and a linear scaling factor (which is mostly useful when combining multiple distributions) The cost are some additional computations such as a square root. This could of course have been handled by an appropriate wrapper instead. They are also arranged differently: the book uses amplitude, position, width whereas we use mean, stddev, scaling The function also can use a mixture of gaussians, just use an appropriate number of parameters (which obviously needs to be a multiple of 3)

Erich Schubert

Field Summary
(package private) static double Sqrt2PI
          precomputed constant value of Sqrt(2*PI)
Constructor Summary
Method Summary
 FittingFunctionResult eval(double x, double[] params)
          compute the mixture of Gaussians at the given position
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


static final double Sqrt2PI
precomputed constant value of Sqrt(2*PI)

Constructor Detail


public GaussianFittingFunction()
Method Detail


public FittingFunctionResult eval(double x,
                                  double[] params)
compute the mixture of Gaussians at the given position

Specified by:
eval in interface FittingFunction
x - Current coordinate
params - Function parameters parameters
Array consisting of y value and parameter gradients

Release 0.2.1 (2009-07-13_1605)