jphase.fit

## Class EMHyperErlangFit

- java.lang.Object
- - jphase.fit.ContPhaseFitter
  - - jphase.fit.MLContPhaseFitter
    - - 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 returns a Hyper-Erlang distribution, a subclass of Phase-type distributions.
  Version:
    1.0
  Author:
    Juan F. Pérez

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `maxIter` Maximum number of iterations for the algorithm execution
    `static double` | `precision` Precision for the convergence criterion in the algorithm
    `static double` | `precisionCV` Precision for the convergence criterion in the coefficient of variance

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HyperErlangVar` | `doFitHyperErlang()` Returns a HyperErlang variable with the best fit experiments to be fitted
    `double` | `doFitNM(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(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 experiments to be fitted
    `ContPhaseVar` | `fit()` Returns a HyperErlang variable with the best fit, in the form of a Dense Continuous Phase variable
    `ContPhaseVar` | `fit(int N)` 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

      `equals, 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

    - #### maxIter

          public static int maxIter

      Maximum number of iterations for the algorithm execution

  - ### Constructor Detail

    - #### EMHyperErlangFit

          public EMHyperErlangFit(double[] data)

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

  - ### Method Detail

    - #### fit

          public ContPhaseVar 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()`

    - #### fit

          public ContPhaseVar fit(int N)

      Returns a HyperErlang variable with the best fit, in the form of a Dense Continuous Phase variable
      Parameters:
        `N` - number of phases in the distribution
      Returns:
        HyperErlang variable with the best fit

    - #### doFitHyperErlang

          public HyperErlangVar doFitHyperErlang()

      Returns a HyperErlang variable with the best fit experiments to be fitted
      Returns:
        HyperErlang variable with the best fit

    - #### doFitNM

          public double doFitNM(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:
        `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(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 experiments to be fitted
      Parameters:
        `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.