🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.ml
Class RTrees
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.ml.StatModel
-
- org.opencv.ml.DTrees
-
- org.opencv.ml.RTrees
public class RTrees extends DTrees
このクラスはランダムフォレスト予測器を実装する。参照: REF: ml_intro_rtrees
-
-
フィールドの要約
-
クラス org.opencv.ml.DTrees から継承したフィールド
PREDICT_AUTO, PREDICT_MASK, PREDICT_MAX_VOTE, PREDICT_SUM
-
クラス org.opencv.ml.StatModel から継承されたフィールド
COMPRESSED_INPUT, PREPROCESSED_INPUT, RAW_OUTPUT, UPDATE_MODEL
-
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedRTrees​(long addr)
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static RTrees__fromPtr__​(long addr)static RTreescreate()Creates the empty model.intgetActiveVarCount()SEE: setActiveVarCountbooleangetCalculateVarImportance()SEE: setCalculateVarImportancedoublegetOOBError()Returns the OOB error value, computed at the training stage when calcOOBError is set to true.TermCriteriagetTermCriteria()SEE: setTermCriteriaMatgetVarImportance()Returns the variable importance array.voidgetVotes​(Mat samples, Mat results, int flags)Returns the result of each individual tree in the forest.static RTreesload​(java.lang.String filepath)Loads and creates a serialized RTree from a file Use RTree::save to serialize and store an RTree to disk.static RTreesload​(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.voidsetActiveVarCount​(int val)getActiveVarCount SEE: getActiveVarCountvoidsetCalculateVarImportance​(boolean val)getCalculateVarImportance SEE: getCalculateVarImportancevoidsetTermCriteria​(TermCriteria val)getTermCriteria SEE: getTermCriteria-
クラス org.opencv.ml.DTrees から継承したメソッド
getCVFolds, getMaxCategories, getMaxDepth, getMinSampleCount, getPriors, getRegressionAccuracy, getTruncatePrunedTree, getUse1SERule, getUseSurrogates, setCVFolds, setMaxCategories, setMaxDepth, setMinSampleCount, setPriors, setRegressionAccuracy, setTruncatePrunedTree, setUse1SERule, setUseSurrogates
-
クラス org.opencv.ml.StatModel から継承されたメソッド
calcError, empty, getVarCount, isClassifier, isTrained, predict, predict, predict, train, train, train
-
クラス org.opencv.core.Algorithm から継承されたメソッド
clear, getDefaultName, getNativeObjAddr, save
-
-
-
-
メソッドの詳細
-
__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 へのパス- 戻り値:
- 自動生成
-
-