🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.ml

Class RTrees


  • public class RTrees extends DTrees
    このクラスはランダムフォレスト予測器を実装する。参照: REF: ml_intro_rtrees
    • コンストラクタの詳細

      • RTrees

        protected RTrees​(long addr)
    • メソッドの詳細

      • __fromPtr__

        public static RTrees __fromPtr__​(long addr)
      • getCalculateVarImportance

        public boolean getCalculateVarImportance()
        SEE: setCalculateVarImportance
        戻り値:
        自動生成
      • setCalculateVarImportance

        public void setCalculateVarImportance​(boolean val)
        getCalculateVarImportance SEE: getCalculateVarImportance
        引数:
        val - 自動生成
      • getActiveVarCount

        public int getActiveVarCount()
        SEE: setActiveVarCount
        戻り値:
        自動生成
      • setActiveVarCount

        public void setActiveVarCount​(int val)
        getActiveVarCount SEE: getActiveVarCount
        引数:
        val - 自動生成
      • getTermCriteria

        public TermCriteria getTermCriteria()
        SEE: setTermCriteria
        戻り値:
        自動生成
      • setTermCriteria

        public void setTermCriteria​(TermCriteria val)
        getTermCriteria SEE: getTermCriteria
        引数:
        val - 自動生成
      • getVarImportance

        public Mat getVarImportance()
        Returns the variable importance array. The method returns the variable importance vector, computed at the training stage when CalculateVarImportance is set to true. If this flag was set to false, the empty matrix is returned.
        戻り値:
        自動生成
      • getVotes

        public void getVotes​(Mat samples,
                             Mat results,
                             int flags)
        Returns the result of each individual tree in the forest. In case the model is a regression problem, the method will return each of the trees' results for each of the sample cases. If the model is a classifier, it will return a Mat with samples + 1 rows, where the first row gives the class number and the following rows return the votes each class had for each sample.
        引数:
        samples - 投票を計算する対象のサンプルを含む配列。
        results - 計算結果が書き込まれる配列。
        flags - RTrees の型を定義するためのフラグ。
      • getOOBError

        public double getOOBError()
        Returns the OOB error value, computed at the training stage when calcOOBError is set to true. If this flag was set to false, 0 is returned. The OOB error is also scaled by sample weighting.
        戻り値:
        自動生成
      • create

        public static RTrees create()
        Creates the empty model. Use StatModel::train to train the model, StatModel::train to create and train the model, Algorithm::load to load the pre-trained model.
        戻り値:
        自動生成
      • load

        public static RTrees load​(java.lang.String filepath,
                                  java.lang.String nodeName)
        Loads and creates a serialized RTree from a file Use RTree::save to serialize and store an RTree to disk. Load the RTree from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
        引数:
        filepath - シリアライズされた RTree へのパス
        nodeName - 分類器を含むノードの名前
        戻り値:
        自動生成
      • load

        public static RTrees load​(java.lang.String filepath)
        Loads and creates a serialized RTree from a file Use RTree::save to serialize and store an RTree to disk. Load the RTree from this file again, by calling this function with the path to the file. Optionally specify the node for the file containing the classifier
        引数:
        filepath - シリアライズされた RTree へのパス
        戻り値:
        自動生成