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

org.opencv.ml

## Class StatModel

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

- Direct Known Subclasses:
    ANN_MLP, DTrees, EM, KNearest, LogisticRegression, NormalBayesClassifier, SVM, SVMSGD

      public class StatModel
      extends Algorithm

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `COMPRESSED_INPUT`
    `static int` | `PREPROCESSED_INPUT`
    `static int` | `RAW_OUTPUT`
    `static int` | `UPDATE_MODEL`

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

      `nativeObj`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static StatModel` | `__fromPtr__(long addr)`
    `float` | `calcError(TrainData data, boolean test, Mat resp)`
    `boolean` | `empty()`
    `protected void` | `finalize()`
    `int` | `getVarCount()`
    `boolean` | `isClassifier()`
    `boolean` | `isTrained()`
    `float` | `predict(Mat samples)`
    `float` | `predict(Mat samples, Mat results, int flags)`
    `boolean` | `train(Mat samples, int layout, Mat responses)`
    `boolean` | `train(TrainData trainData)`
    `boolean` | `train(TrainData trainData, int flags)`

    - ### 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

    - #### UPDATE_MODEL

          public static final int UPDATE_MODEL

      See Also:
        Constant Field Values

    - #### RAW_OUTPUT

          public static final int RAW_OUTPUT

      See Also:
        Constant Field Values

    - #### COMPRESSED_INPUT

          public static final int COMPRESSED_INPUT

      See Also:
        Constant Field Values

    - #### PREPROCESSED_INPUT

          public static final int PREPROCESSED_INPUT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### StatModel

          protected StatModel(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static StatModel __fromPtr__(long addr)

    - #### empty

          public boolean empty()

      Overrides:
        `empty` in class `Algorithm`

    - #### isClassifier

          public boolean isClassifier()

    - #### isTrained

          public boolean isTrained()

    - #### train

          public boolean train(Mat samples,
                               int layout,
                               Mat responses)

    - #### train

          public boolean train(TrainData trainData,
                               int flags)

    - #### train

          public boolean train(TrainData trainData)

    - #### calcError

          public float calcError(TrainData data,
                                 boolean test,
                                 Mat resp)

    - #### predict

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

    - #### predict

          public float predict(Mat samples)

    - #### getVarCount

          public int getVarCount()

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

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

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