jphase.fit

## Class EMPhaseFit

- java.lang.Object
- - jphase.fit.ContPhaseFitter
  - - jphase.fit.MLContPhaseFitter
    - - jphase.fit.EMPhaseFit

- All Implemented Interfaces:
    PhaseFitter

      public class EMPhaseFit
      extends MLContPhaseFitter

  This class implements the Maximum Likelihood method proposed by Asmussen, Nerman and Olsson in "Fitting Phase-type Distributions via the EM algorithm", 1996. The method returns a general continuous Phase-Type distributions.
  Version:
    1.0
  Author:
    Juan F. Pérez

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `evalPoints` Constant to multiply the size of the data trace to obtain the number of evaluation points.
    `static double` | `logPrecision`
    `static double` | `precision` Precision for the convergence criterion in the algorithm
    `static double` | `precisionParam` Precision for the convergence criterion in the coefficient of variance

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EMPhaseFit(double[] data)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `doFitN(double[] data)` Estimation method with a given number of phases
    `DenseContPhaseVar` | `fit()` Executes the fitting procedure to find the parameter set

    - ### Methods inherited from class jphase.fit.MLContPhaseFitter

      `getLogLikelihood`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### precision

          public static double precision

      Precision for the convergence criterion in the algorithm

    - #### logPrecision

          public static double logPrecision

    - #### precisionParam

          public static double precisionParam

      Precision for the convergence criterion in the coefficient of variance

    - #### evalPoints

          public static int evalPoints

      Constant to multiply the size of the data trace to obtain the number of evaluation points. The number of evaluation points in the Runge-Kutta algorithm is the size of the data trace times evalPoints

  - ### Constructor Detail

    - #### EMPhaseFit

          public EMPhaseFit(double[] data)

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

  - ### Method Detail

    - #### fit

          public DenseContPhaseVar fit()

      Description copied from interface: `PhaseFitter`
      Executes the fitting procedure to find the parameter set
      Specified by:
        `fit` in interface `PhaseFitter`
      Specified by:
        `fit` in class `ContPhaseFitter`
      Returns:
        Phase-Type variable with the best fit
      See Also:
        `PhaseFitter.fit()`

    - #### doFitN

          public double doFitN(double[] data)

      Estimation method with a given number of phases
      Parameters:
        `data` -
      Returns:
        The log-likelihood