jphase.fit
Class MomentsACPHFit

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

public class MomentsACPHFit
extends MomentsContPhaseFitter

* This class implements the Matching Moments method proposed by Bobbio, Horvath and Telek in "Matching threee moments with minimal acyclic Phase-Type distributions", 2005. The method match the first three moments of any distribution to a subclass of Phase-Type distributions known as Acyclic Phase-Type distributions.

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
MomentsACPHFit(double[] data)
           
MomentsACPHFit(double m1, double m2, double m3)
           
 
Method Summary
 ContPhaseVar fit()
          Solve the equation system to get the parameters of the distribution, if the moments are feasible
 int getSize(double n2, double n3)
          Calculates the minimum number of phases needed to represent the tuple of the normalized moments
 
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

MomentsACPHFit

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

MomentsACPHFit

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

fit

public ContPhaseVar fit()
Solve the equation system to get the parameters of the distribution, if the moments are feasible

Specified by:
fit in interface PhaseFitter
Specified by:
fit in class ContPhaseFitter
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
See Also:
PhaseFitter.fit()

getSize

public int getSize(double n2,
                   double n3)
Calculates the minimum number of phases needed to represent the tuple of the normalized moments

Parameters:
n2 - Second normalized moment
n3 - Third normalized moment
Returns:
Minimum number of phases needed to represent the tuple of the normalized moments