weka.estimators

## Class UnivariateMixtureEstimator.MM

- java.lang.Object
- - weka.estimators.UnivariateMixtureEstimator.MM

- Enclosing class:
    UnivariateMixtureEstimator

      public class UnivariateMixtureEstimator.MM
      extends java.lang.Object

  Fast univariate mixture model implementation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnivariateMixtureEstimator.MM()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `initializeModel(int K, double[] values, double[] weights, java.util.Random r)` Initializes the model.
    `double` | `logDensity(double value)` Computes log of density for given value.
    `double` | `loglikelihood(double[] values, double[] weights)` Computes loglikelihood of current model.
    `double` | `MSE()` Returns average of squared errors for current model.
    `double[][]` | `predictIntervals(double conf)` Returns the interval for the given confidence value.
    `double` | `predictQuantile(double percentage)` Returns the quantile for the given percentage.
    `java.lang.String` | `toString()` Returns string describing the estimator.

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

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

- - ### Constructor Detail

    - #### UnivariateMixtureEstimator.MM

          public UnivariateMixtureEstimator.MM()

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Returns string describing the estimator.
      Overrides:
        `toString` in class `java.lang.Object`

    - #### initializeModel

          public void initializeModel(int K,
                             double[] values,
                             double[] weights,
                             java.util.Random r)

      Initializes the model. Assumes K >= 1, values.length >= 1, and values.length = weights.length.

    - #### loglikelihood

          public double loglikelihood(double[] values,
                             double[] weights)

      Computes loglikelihood of current model.

    - #### MSE

          public double MSE()

      Returns average of squared errors for current model.

    - #### logDensity

          public double logDensity(double value)

      Computes log of density for given value.

    - #### predictIntervals

          public double[][] predictIntervals(double conf)

      Returns the interval for the given confidence value.
      Parameters:
        `conf` - the confidence value in the interval [0, 1]
      Returns:
        the interval

    - #### predictQuantile

          public double predictQuantile(double percentage)

      Returns the quantile for the given percentage.
      Parameters:
        `percentage` - the percentage
      Returns:
        the quantile