jphase.fit
Class EMHyperErlangFit

java.lang.Object
  extended by jphase.fit.ContPhaseFitter
      extended by jphase.fit.MLContPhaseFitter
          extended by jphase.fit.EMHyperErlangFit
All Implemented Interfaces:
PhaseFitter

public class EMHyperErlangFit
extends MLContPhaseFitter

This class implements the Maximum Likelihood method proposed by Thümmler, Buchholz and Telek in "A novel approach for fitting probability distributions to real trace data with the EM algorithm", 2005. The method matches the likelilihood of any distribution to a subclass of Phase-Type distributions known as Hyper-Erlang distributions.

Author:
Juan Fernando Perez

Field Summary
static double precision
          Precision for the convergence criterion in the algorithm
static double precisionCV
          Precision for the convergence criterion in the coefficient of variance
 
Fields inherited from class jphase.fit.ContPhaseFitter
data, var
 
Constructor Summary
EMHyperErlangFit(double[] data)
           
 
Method Summary
 HyperErlangVar doFitHyperErlang(double[] data)
          Returns a HyperErlang variable with the best fit
 double doFitNM(double[] data, HyperErlangVar var)
          This method returns a completely specified HyperErlang variable, such that it has the best likelihood between all the possible combinations of N phases in M branches
 double doFitNMR(double[] data, HyperErlangVar var)
          This method returns a completely specified HyperErlang variable, such that it has the best likelihood after the execution of the EM algorithm for the case where the variable has N phases in M branches, distributed as determined by the vector r
 DenseContPhaseVar fit()
          Returns a HyperErlang variable with the best fit, in the form of a Dense Continuous Phase variable
 
Methods inherited from class jphase.fit.MLContPhaseFitter
getLogLikelihood
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

precision

public static double precision
Precision for the convergence criterion in the algorithm


precisionCV

public static double precisionCV
Precision for the convergence criterion in the coefficient of variance

Constructor Detail

EMHyperErlangFit

public EMHyperErlangFit(double[] data)
Parameters:
data -
Method Detail

fit

public DenseContPhaseVar fit()
Returns a HyperErlang variable with the best fit, in the form of a Dense Continuous Phase variable

Specified by:
fit in interface PhaseFitter
Specified by:
fit in class ContPhaseFitter
Returns:
HyperErlang variable with the best fit
See Also:
PhaseFitter.fit()

doFitHyperErlang

public HyperErlangVar doFitHyperErlang(double[] data)
Returns a HyperErlang variable with the best fit

Parameters:
data - non-negative data trace from independent experiments to be fitted
Returns:
HyperErlang variable with the best fit

doFitNM

public double doFitNM(double[] data,
                      HyperErlangVar var)
This method returns a completely specified HyperErlang variable, such that it has the best likelihood between all the possible combinations of N phases in M branches

Parameters:
data - non-negative data trace from independent experiments to be fitted
var - HyperErlang variable with the parameters N and M determined
Returns:
Likelihood of the best variable found. The variable is modified with the best parameters found.

doFitNMR

public double doFitNMR(double[] data,
                       HyperErlangVar var)
This method returns a completely specified HyperErlang variable, such that it has the best likelihood after the execution of the EM algorithm for the case where the variable has N phases in M branches, distributed as determined by the vector r

Parameters:
data - non-negative data trace from independent experiments to be fitted
var - HyperErlang variable with the parameters N, M and r determined
Returns:
Likelihood of the best variable found. The variable is modified with the best parameters found.