org.opencv.ml

## Class NormalBayesClassifier

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

-     public class NormalBayesClassifier
      extends StatModel

  Bayes classifier for normally distributed data. SEE: REF: ml_intro_bayes

- - ### Field Summary

    - ### 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` | `NormalBayesClassifier(long addr)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static NormalBayesClassifier` | `__fromPtr__(long addr)`
    `static NormalBayesClassifier` | `create()` Creates empty model Use StatModel::train to train the model after creation.
    `protected void` | `finalize()`
    `static NormalBayesClassifier` | `load(String filepath)` Loads and creates a serialized NormalBayesClassifier from a file Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk.
    `static NormalBayesClassifier` | `load(String filepath, String nodeName)` Loads and creates a serialized NormalBayesClassifier from a file Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk.
    `float` | `predictProb(Mat inputs, Mat outputs, Mat outputProbs)` Predicts the response for sample(s).
    `float` | `predictProb(Mat inputs, Mat outputs, Mat outputProbs, int flags)` Predicts the response for sample(s).

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

      `calcError, empty, getVarCount, isClassifier, isTrained, predict, predict, predict, 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`

- - ### Constructor Detail

    - #### NormalBayesClassifier

          protected NormalBayesClassifier(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static NormalBayesClassifier __fromPtr__(long addr)

    - #### create

          public static NormalBayesClassifier create()

      Creates empty model Use StatModel::train to train the model after creation.
      Returns:
        automatically generated

    - #### load

          public static NormalBayesClassifier load(String filepath,
                                                   String nodeName)

      Loads and creates a serialized NormalBayesClassifier from a file Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk. Load the NormalBayesClassifier from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
      Parameters:
        `filepath` - path to serialized NormalBayesClassifier
        `nodeName` - name of node containing the classifier
      Returns:
        automatically generated

    - #### load

          public static NormalBayesClassifier load(String filepath)

      Loads and creates a serialized NormalBayesClassifier from a file Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk. Load the NormalBayesClassifier from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
      Parameters:
        `filepath` - path to serialized NormalBayesClassifier
      Returns:
        automatically generated

    - #### predictProb

          public float predictProb(Mat inputs,
                                   Mat outputs,
                                   Mat outputProbs,
                                   int flags)

      Predicts the response for sample(s). The method estimates the most probable classes for input vectors. Input vectors (one or more) are stored as rows of the matrix inputs. In case of multiple input vectors, there should be one output vector outputs. The predicted class for a single input vector is returned by the method. The vector outputProbs contains the output probabilities corresponding to each element of result.
      Parameters:
        `inputs` - automatically generated
        `outputs` - automatically generated
        `outputProbs` - automatically generated
        `flags` - automatically generated
      Returns:
        automatically generated

    - #### predictProb

          public float predictProb(Mat inputs,
                                   Mat outputs,
                                   Mat outputProbs)

      Predicts the response for sample(s). The method estimates the most probable classes for input vectors. Input vectors (one or more) are stored as rows of the matrix inputs. In case of multiple input vectors, there should be one output vector outputs. The predicted class for a single input vector is returned by the method. The vector outputProbs contains the output probabilities corresponding to each element of result.
      Parameters:
        `inputs` - automatically generated
        `outputs` - automatically generated
        `outputProbs` - automatically generated
      Returns:
        automatically generated

    - #### finalize

          protected void finalize()
                           throws Throwable

      Overrides:
        `finalize` in class `StatModel`
      Throws:
        `Throwable`

Generated on Thu Jul 25 2019 21:39:44 UTC / OpenCV 3.4.7