Class MMPP2

  • All Implemented Interfaces:
    java.io.Serializable , jline.lang.Copyable

    
    public class MMPP2
    extends MarkovModulated implements Serializable
                        

    A Markovian-modulated Poisson Process with 2 states

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      MMPP2(double lambda0, double lambda1, double sigma0, double sigma1)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static MMPP2 fitCentralAndACFDecay(double mean, double var, double skew, double g2)
      static MMPP2 fitCentralAndACFLag1(double mean, double var, double skew, double acf1)
      static MMPP2 fitCentralAndIDC(double mean, double var, double skew, double idc)
      static MMPP2 fitRawMomentsAndACFDecay(double m1, double m2, double m3, double gamma2)
      static MMPP2 fitRawMomentsAndACFLag1(double m1, double m2, double m3, double rho1)
      static MMPP2 fitRawMomentsAndIDC(double m1, double m2, double m3, double idc)
      static MMPP2 rand()
      Matrix D(int i) Gets the i-th matrix of the Markovian arrival process representation.
      Matrix evalACFT(Array<int> lags, double timescale)
      double evalCDF(double t) Evaluates the cumulative distribution function (CDF) at time t.
      double evalLST(double s) Evaluates the Laplace-Stieltjes Transform (LST) at parameter s.
      double evalMeanT(double t) Evaluates the mean count at time t.
      double getACFDecay(Matrix lags)
      Matrix getEmbedded() Gets the embedded Markov chain transition matrix.
      Matrix getEmbeddedProb() Gets the stationary probability vector of the embedded Markov chain.
      double getIDC() Gets the index of dispersion for counts (IDC).
      double getIDI() Gets the index of dispersion for intervals (IDI).
      double getMean() Gets the mean of this Markovian distribution.
      long getNumberOfPhases() Gets the number of phases in this Markovian distribution.
      double getRate() Gets the rate of this distribution (inverse of mean).
      double getSCV() Gets the squared coefficient of variation (SCV) of this distribution.
      double getSkewness() Gets the skewness of this distribution.
      double getVar() Gets the variance of this distribution.
      void normalize() Normalizes the MMPP2 so that D0+D1 rows form a proper infinitesimal generator.
      Array<double> sample(int n) Generates random samples from this distribution using default random generator.
      Array<double> sample(int n, Random random) Generates random samples from this distribution using the specified random generator.
      MAP toTimeReversed()
      double evalPDF(double t) Evaluates the probability density function (PDF) at time t.
      double evalVarT(double t) Evaluates the variance at time t.
      String toString() Returns a string representation of this MMPP2 process.
      boolean equals(Object obj) Checks if this MMPP2 is equal to another object.
      int hashCode() Returns the hash code for this MMPP2 process.
      • Methods inherited from class jline.lang.processes.MarkovModulated

        getACFDecay
      • Methods inherited from class jline.lang.processes.Markovian

        acf, embedded, embeddedProb, evalCDF, getACF, getInitProb, getMoments, getMu, getPhi, getProcess, getSubgenerator, getVariance, idc, idi, initProb, mean, moments, mu, numPhases, numberOfPhases, phi, process, rate, scv, setMean, setProcess, setRate, skewness, subgenerator, var, variance
      • Methods inherited from class jline.lang.processes.Distribution

        evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, name, numParams, param, setNumParams, setParam, support
      • Methods inherited from class jline.lang.Copyable

        copy
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MMPP2

        MMPP2(double lambda0, double lambda1, double sigma0, double sigma1)
    • Method Detail

      • D

         Matrix D(int i)

        Gets the i-th matrix of the Markovian arrival process representation.

        Parameters:
        i - the matrix index (0 for D0, 1 for D1, etc.
        Returns:

        the matrix at index i

      • evalCDF

         double evalCDF(double t)

        Evaluates the cumulative distribution function (CDF) at time t. For MMPP2, this represents the probability that an inter-arrival time is less than or equal to t.

        Parameters:
        t - the time value
        Returns:

        the CDF value at time t

      • evalLST

         double evalLST(double s)

        Evaluates the Laplace-Stieltjes Transform (LST) at parameter s. For MMPP2, LST(s) = alpha * (-T + s*I)^(-1) * t

        Parameters:
        s - the transform parameter
        Returns:

        the LST value at parameter s

      • evalMeanT

         double evalMeanT(double t)

        Evaluates the mean count at time t.

        Parameters:
        t - the time point
        Returns:

        the mean count at time t

      • getEmbedded

         Matrix getEmbedded()

        Gets the embedded Markov chain transition matrix.

        Returns:

        the embedded chain matrix

      • getEmbeddedProb

         Matrix getEmbeddedProb()

        Gets the stationary probability vector of the embedded Markov chain.

        Returns:

        the embedded chain stationary probabilities

      • getIDC

         double getIDC()

        Gets the index of dispersion for counts (IDC).

        Returns:

        the IDC value

      • getIDI

         double getIDI()

        Gets the index of dispersion for intervals (IDI). For renewal processes, IDI = IDC.

        Returns:

        the IDI value

      • getMean

         double getMean()

        Gets the mean of this Markovian distribution.

        Returns:

        the mean value, or NaN if the process contains NaN values

      • getNumberOfPhases

         long getNumberOfPhases()

        Gets the number of phases in this Markovian distribution.

        Returns:

        the number of phases

      • getRate

         double getRate()

        Gets the rate of this distribution (inverse of mean).

        Returns:

        the rate value (1/mean)

      • getSCV

         double getSCV()

        Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.

        Returns:

        the squared coefficient of variation

      • getSkewness

         double getSkewness()

        Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.

        Returns:

        the skewness value

      • getVar

         double getVar()

        Gets the variance of this distribution. Computed as SCV * mean^2.

        Returns:

        the variance

      • normalize

         void normalize()

        Normalizes the MMPP2 so that D0+D1 rows form a proper infinitesimal generator. Each row sum of (D0+D1) should equal zero for a valid generator.

      • sample

         Array<double> sample(int n)

        Generates random samples from this distribution using default random generator.

        Parameters:
        n - the number of samples to generate
        Returns:

        array of random samples

      • sample

         Array<double> sample(int n, Random random)

        Generates random samples from this distribution using the specified random generator.

        Parameters:
        n - the number of samples to generate
        random - the random number generator to use
        Returns:

        array of random samples

      • evalPDF

         double evalPDF(double t)

        Evaluates the probability density function (PDF) at time t. For MMPP2, this is the derivative of the CDF.

        Parameters:
        t - the time value
        Returns:

        the PDF value at time t

      • evalVarT

         double evalVarT(double t)

        Evaluates the variance at time t. For MMPP2, this provides the variance of the counting process at time t.

        Parameters:
        t - the time value
        Returns:

        the variance at time t

      • toString

         String toString()

        Returns a string representation of this MMPP2 process.

        Returns:

        string representation showing parameters

      • equals

         boolean equals(Object obj)

        Checks if this MMPP2 is equal to another object.

        Parameters:
        obj - the object to compare with
        Returns:

        true if equal, false otherwise

      • hashCode

         int hashCode()

        Returns the hash code for this MMPP2 process.

        Returns:

        hash code based on parameters