jphase.fit

## Class MomentsECPositiveFit

- java.lang.Object
- - jphase.fit.ContPhaseFitter
  - - jphase.fit.MomentsContPhaseFitter
    - - jphase.fit.MomentsECPositiveFit

- All Implemented Interfaces:
    PhaseFitter

      public class MomentsECPositiveFit
      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. This class implements the Positive solution. This method matches the first three moments. This method returns an Erlang-Coxian distributions, a subclass of Phase-Type distributions.
  Version:
    1.0
  Author:
    Juan F. Perez

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MomentsECPositiveFit(double[] data)`
    `MomentsECPositiveFit(double m1, double m2, double m3)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ContPhaseVar` | `fit()` Fits a Phase Type distribution with no mass at zero from a set of moments with the Positive method described by Osogami et al.
    `double[]` | `getParam()` Solves 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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MomentsECPositiveFit

          public MomentsECPositiveFit(double[] data)

      See Also:
        `MomentsContPhaseFitter.MomentsContPhaseFitter(double[])`

    - #### MomentsECPositiveFit

          public MomentsECPositiveFit(double m1,
                              double m2,
                              double m3)

      See Also:
        `MomentsContPhaseFitter.MomentsContPhaseFitter(double,double,double)`

  - ### Method Detail

    - #### fit

          public ContPhaseVar fit()

      Fits a Phase Type distribution with no mass at zero from a set of moments with the Positive 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()
                            throws java.lang.IllegalArgumentException

      Solves 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. If it is necessary, a new exponential phase with parameter lambda will be aggregated through convolution: param[6]=lambda. If it is necessary, a new exponential phase with parameter lambda will be mixed up with probability 1-pMix: param[6]=lambda, param[7] = pMix.
      Throws:
        `java.lang.IllegalArgumentException`