org.opencv.ml

## Class DTrees

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

- Direct Known Subclasses:
    Boost, RTrees

      public class DTrees
      extends StatModel

  The class represents a single decision tree or a collection of decision trees. The current public interface of the class allows user to train only a single decision tree, however the class is capable of storing multiple decision trees and using them for prediction (by summing responses or using a voting schemes), and the derived from DTrees classes (such as RTrees and Boost) use this capability to implement decision tree ensembles. SEE: REF: ml_intro_trees

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `PREDICT_AUTO`
    `static int` | `PREDICT_MASK`
    `static int` | `PREDICT_MAX_VOTE`
    `static int` | `PREDICT_SUM`

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DTrees` | `__fromPtr__(long addr)`
    `static DTrees` | `create()` Creates the empty model The static method creates empty decision tree with the specified parameters.
    `protected void` | `finalize()`
    `int` | `getCVFolds()` SEE: setCVFolds
    `int` | `getMaxCategories()` SEE: setMaxCategories
    `int` | `getMaxDepth()` SEE: setMaxDepth
    `int` | `getMinSampleCount()` SEE: setMinSampleCount
    `Mat` | `getPriors()` SEE: setPriors
    `float` | `getRegressionAccuracy()` SEE: setRegressionAccuracy
    `boolean` | `getTruncatePrunedTree()` SEE: setTruncatePrunedTree
    `boolean` | `getUse1SERule()` SEE: setUse1SERule
    `boolean` | `getUseSurrogates()` SEE: setUseSurrogates
    `static DTrees` | `load(String filepath)` Loads and creates a serialized DTrees from a file Use DTree::save to serialize and store an DTree to disk.
    `static DTrees` | `load(String filepath, String nodeName)` Loads and creates a serialized DTrees from a file Use DTree::save to serialize and store an DTree to disk.
    `void` | `setCVFolds(int val)` getCVFolds SEE: getCVFolds
    `void` | `setMaxCategories(int val)` getMaxCategories SEE: getMaxCategories
    `void` | `setMaxDepth(int val)` getMaxDepth SEE: getMaxDepth
    `void` | `setMinSampleCount(int val)` getMinSampleCount SEE: getMinSampleCount
    `void` | `setPriors(Mat val)` getPriors SEE: getPriors
    `void` | `setRegressionAccuracy(float val)` getRegressionAccuracy SEE: getRegressionAccuracy
    `void` | `setTruncatePrunedTree(boolean val)` getTruncatePrunedTree SEE: getTruncatePrunedTree
    `void` | `setUse1SERule(boolean val)` getUse1SERule SEE: getUse1SERule
    `void` | `setUseSurrogates(boolean val)` getUseSurrogates SEE: getUseSurrogates

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

- - ### Field Detail

    - #### PREDICT_AUTO

          public static final int PREDICT_AUTO

      See Also:
        Constant Field Values

    - #### PREDICT_SUM

          public static final int PREDICT_SUM

      See Also:
        Constant Field Values

    - #### PREDICT_MAX_VOTE

          public static final int PREDICT_MAX_VOTE

      See Also:
        Constant Field Values

    - #### PREDICT_MASK

          public static final int PREDICT_MASK

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DTrees

          protected DTrees(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static DTrees __fromPtr__(long addr)

    - #### getPriors

          public Mat getPriors()

      SEE: setPriors
      Returns:
        automatically generated

    - #### create

          public static DTrees create()

      Creates the empty model The static method creates empty decision tree with the specified parameters. It should be then trained using train method (see StatModel::train). Alternatively, you can load the model from file using Algorithm::load<DTrees>(filename).
      Returns:
        automatically generated

    - #### load

          public static DTrees load(String filepath,
                                    String nodeName)

      Loads and creates a serialized DTrees from a file Use DTree::save to serialize and store an DTree to disk. Load the DTree 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 DTree
        `nodeName` - name of node containing the classifier
      Returns:
        automatically generated

    - #### load

          public static DTrees load(String filepath)

      Loads and creates a serialized DTrees from a file Use DTree::save to serialize and store an DTree to disk. Load the DTree 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 DTree
      Returns:
        automatically generated

    - #### getTruncatePrunedTree

          public boolean getTruncatePrunedTree()

      SEE: setTruncatePrunedTree
      Returns:
        automatically generated

    - #### getUse1SERule

          public boolean getUse1SERule()

      SEE: setUse1SERule
      Returns:
        automatically generated

    - #### getUseSurrogates

          public boolean getUseSurrogates()

      SEE: setUseSurrogates
      Returns:
        automatically generated

    - #### getRegressionAccuracy

          public float getRegressionAccuracy()

      SEE: setRegressionAccuracy
      Returns:
        automatically generated

    - #### getCVFolds

          public int getCVFolds()

      SEE: setCVFolds
      Returns:
        automatically generated

    - #### getMaxCategories

          public int getMaxCategories()

      SEE: setMaxCategories
      Returns:
        automatically generated

    - #### getMaxDepth

          public int getMaxDepth()

      SEE: setMaxDepth
      Returns:
        automatically generated

    - #### getMinSampleCount

          public int getMinSampleCount()

      SEE: setMinSampleCount
      Returns:
        automatically generated

    - #### setCVFolds

          public void setCVFolds(int val)

      getCVFolds SEE: getCVFolds
      Parameters:
        `val` - automatically generated

    - #### setMaxCategories

          public void setMaxCategories(int val)

      getMaxCategories SEE: getMaxCategories
      Parameters:
        `val` - automatically generated

    - #### setMaxDepth

          public void setMaxDepth(int val)

      getMaxDepth SEE: getMaxDepth
      Parameters:
        `val` - automatically generated

    - #### setMinSampleCount

          public void setMinSampleCount(int val)

      getMinSampleCount SEE: getMinSampleCount
      Parameters:
        `val` - automatically generated

    - #### setPriors

          public void setPriors(Mat val)

      getPriors SEE: getPriors
      Parameters:
        `val` - automatically generated

    - #### setRegressionAccuracy

          public void setRegressionAccuracy(float val)

      getRegressionAccuracy SEE: getRegressionAccuracy
      Parameters:
        `val` - automatically generated

    - #### setTruncatePrunedTree

          public void setTruncatePrunedTree(boolean val)

      getTruncatePrunedTree SEE: getTruncatePrunedTree
      Parameters:
        `val` - automatically generated

    - #### setUse1SERule

          public void setUse1SERule(boolean val)

      getUse1SERule SEE: getUse1SERule
      Parameters:
        `val` - automatically generated

    - #### setUseSurrogates

          public void setUseSurrogates(boolean val)

      getUseSurrogates SEE: getUseSurrogates
      Parameters:
        `val` - 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