EM (OpenCV 3.4.2 Java documentation)
Date: 2019-04-14

org.opencv.ml

## Class EM

- java.lang.Object
- - org.opencv.core.Algorithm
  - - org.opencv.ml.StatModel
    - - org.opencv.ml.EM

-     public class EM
      extends StatModel

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `COV_MAT_DEFAULT`
    `static int` | `COV_MAT_DIAGONAL`
    `static int` | `COV_MAT_GENERIC`
    `static int` | `COV_MAT_SPHERICAL`
    `static int` | `DEFAULT_MAX_ITERS`
    `static int` | `DEFAULT_NCLUSTERS`
    `static int` | `START_AUTO_STEP`
    `static int` | `START_E_STEP`
    `static int` | `START_M_STEP`

    - ### Fields inherited from class org.opencv.ml.StatModel

      `COMPRESSED_INPUT, PREPROCESSED_INPUT, RAW_OUTPUT, UPDATE_MODEL`

    - ### Fields inherited from class org.opencv.core.Algorithm

      `nativeObj`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `EM(long addr)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static EM` | `__fromPtr__(long addr)`
    `static EM` | `create()`
    `protected void` | `finalize()`
    `int` | `getClustersNumber()`
    `int` | `getCovarianceMatrixType()`
    `void` | `getCovs(java.util.List<Mat> covs)`
    `Mat` | `getMeans()`
    `TermCriteria` | `getTermCriteria()`
    `Mat` | `getWeights()`
    `static EM` | `load(java.lang.String filepath)`
    `static EM` | `load(java.lang.String filepath, java.lang.String nodeName)`
    `float` | `predict(Mat samples)`
    `float` | `predict(Mat samples, Mat results, int flags)`
    `double[]` | `predict2(Mat sample, Mat probs)`
    `void` | `setClustersNumber(int val)`
    `void` | `setCovarianceMatrixType(int val)`
    `void` | `setTermCriteria(TermCriteria val)`
    `boolean` | `trainE(Mat samples, Mat means0)`
    `boolean` | `trainE(Mat samples, Mat means0, Mat covs0, Mat weights0, Mat logLikelihoods, Mat labels, Mat probs)`
    `boolean` | `trainEM(Mat samples)`
    `boolean` | `trainEM(Mat samples, Mat logLikelihoods, Mat labels, Mat probs)`
    `boolean` | `trainM(Mat samples, Mat probs0)`
    `boolean` | `trainM(Mat samples, Mat probs0, Mat logLikelihoods, Mat labels, Mat probs)`

    - ### Methods inherited from class org.opencv.ml.StatModel

      `calcError, empty, getVarCount, isClassifier, isTrained, train, train, train`

    - ### Methods inherited from class org.opencv.core.Algorithm

      `clear, getDefaultName, getNativeObjAddr, save`

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

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

- - ### Field Detail

    - #### COV_MAT_SPHERICAL

          public static final int COV_MAT_SPHERICAL

      See Also:
        Constant Field Values

    - #### COV_MAT_DIAGONAL

          public static final int COV_MAT_DIAGONAL

      See Also:
        Constant Field Values

    - #### COV_MAT_GENERIC

          public static final int COV_MAT_GENERIC

      See Also:
        Constant Field Values

    - #### COV_MAT_DEFAULT

          public static final int COV_MAT_DEFAULT

      See Also:
        Constant Field Values

    - #### DEFAULT_NCLUSTERS

          public static final int DEFAULT_NCLUSTERS

      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_ITERS

          public static final int DEFAULT_MAX_ITERS

      See Also:
        Constant Field Values

    - #### START_E_STEP

          public static final int START_E_STEP

      See Also:
        Constant Field Values

    - #### START_M_STEP

          public static final int START_M_STEP

      See Also:
        Constant Field Values

    - #### START_AUTO_STEP

          public static final int START_AUTO_STEP

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### EM

          protected EM(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static EM __fromPtr__(long addr)

    - #### getMeans

          public Mat getMeans()

    - #### getWeights

          public Mat getWeights()

    - #### create

          public static EM create()

    - #### load

          public static EM load(java.lang.String filepath,
                                java.lang.String nodeName)

    - #### load

          public static EM load(java.lang.String filepath)

    - #### getTermCriteria

          public TermCriteria getTermCriteria()

    - #### predict2

          public double[] predict2(Mat sample,
                                   Mat probs)

    - #### trainE

          public boolean trainE(Mat samples,
                                Mat means0,
                                Mat covs0,
                                Mat weights0,
                                Mat logLikelihoods,
                                Mat labels,
                                Mat probs)

    - #### trainE

          public boolean trainE(Mat samples,
                                Mat means0)

    - #### trainEM

          public boolean trainEM(Mat samples,
                                 Mat logLikelihoods,
                                 Mat labels,
                                 Mat probs)

    - #### trainEM

          public boolean trainEM(Mat samples)

    - #### trainM

          public boolean trainM(Mat samples,
                                Mat probs0,
                                Mat logLikelihoods,
                                Mat labels,
                                Mat probs)

    - #### trainM

          public boolean trainM(Mat samples,
                                Mat probs0)

    - #### predict

          public float predict(Mat samples,
                               Mat results,
                               int flags)

      Overrides:
        `predict` in class `StatModel`

    - #### predict

          public float predict(Mat samples)

      Overrides:
        `predict` in class `StatModel`

    - #### getClustersNumber

          public int getClustersNumber()

    - #### getCovarianceMatrixType

          public int getCovarianceMatrixType()

    - #### getCovs

          public void getCovs(java.util.List<Mat> covs)

    - #### setClustersNumber

          public void setClustersNumber(int val)

    - #### setCovarianceMatrixType

          public void setCovarianceMatrixType(int val)

    - #### setTermCriteria

          public void setTermCriteria(TermCriteria val)

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

      Overrides:
        `finalize` in class `StatModel`
      Throws:
        `java.lang.Throwable`

Generated on Sun Apr 14 2019 09:17:32 MDT / OpenCV unknown