jphase.fit
Class MomentsECCompleteFit

java.lang.Object
  extended by jphase.fit.ContPhaseFitter
      extended by jphase.fit.MomentsContPhaseFitter
          extended by jphase.fit.MomentsECCompleteFit
All Implemented Interfaces:
PhaseFitter

public class MomentsECCompleteFit
extends MomentsContPhaseFitter

This class implements the Matching Moments method proposed by Osogami and Harchol in "Closed form solutions for mapping general distributions to quasi-minimal PH distributions", 2005. The method match the first three moments of any distribution to a subclass of Phase-Type distributions known as Erlang-Coxian distributions. This class implements the Complete solution.

Author:
Juan Fernando Perez

Field Summary
 
Fields inherited from class jphase.fit.MomentsContPhaseFitter
m1, m2, m3
 
Fields inherited from class jphase.fit.ContPhaseFitter
data, var
 
Constructor Summary
MomentsECCompleteFit(double[] data)
           
MomentsECCompleteFit(double m1, double m2, double m3)
           
 
Method Summary
 ContPhaseVar fit()
          Fit a Phase Type distribution from a set of moments with the Complete method described by Osogami et al.
 double[] getParam()
          Solve the equation system to get the parameters of the distribution, if the moments are feasible
 
Methods inherited from class jphase.fit.ContPhaseFitter
getLogLikelihood
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MomentsECCompleteFit

public MomentsECCompleteFit(double[] data)
Parameters:
data -

MomentsECCompleteFit

public MomentsECCompleteFit(double m1,
                            double m2,
                            double m3)
Parameters:
m1 -
m2 -
m3 -
Method Detail

fit

public ContPhaseVar fit()
Fit a Phase Type distribution from a set of moments with the Complete method described by Osogami et al.

Specified by:
fit in interface PhaseFitter
Specified by:
fit in class ContPhaseFitter
Returns:
Phase variable found
See Also:
PhaseFitter.fit()

getParam

public double[] getParam()
Solve the equation system to get the parameters of the distribution, if the moments are feasible

Returns:
Parameters of the Acyclic Continuous Phase Distribution of order n. param[0]=n, param[1]=p, param[2]=lambdaY, param[3]=lambdaX1, param[4]=lambdaX2, param[5]=pX