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

クラス LogisticRegression


  • public class LogisticRegression extends StatModel
    ロジスティック回帰分類器を実装する。参照: ml_intro_lr
    • コンストラクタの詳細

      • LogisticRegression

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

      • getLearningRate

        public double getLearningRate()
        SEE: setLearningRate
        戻り値:
        自動生成
      • setLearningRate

        public void setLearningRate​(double val)
        getLearningRate SEE: getLearningRate
        引数:
        val - 自動生成
      • getIterations

        public int getIterations()
        SEE: setIterations
        戻り値:
        自動生成
      • setIterations

        public void setIterations​(int val)
        getIterations SEE: getIterations
        引数:
        val - 自動生成
      • getRegularization

        public int getRegularization()
        SEE: setRegularization
        戻り値:
        自動生成
      • setRegularization

        public void setRegularization​(int val)
        getRegularization SEE: getRegularization
        引数:
        val - 自動生成
      • getTrainMethod

        public int getTrainMethod()
        SEE: setTrainMethod
        戻り値:
        自動生成
      • setTrainMethod

        public void setTrainMethod​(int val)
        getTrainMethod SEE: getTrainMethod
        引数:
        val - 自動生成
      • getMiniBatchSize

        public int getMiniBatchSize()
        SEE: setMiniBatchSize
        戻り値:
        自動生成
      • setMiniBatchSize

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

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

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

        public float predict​(Mat samples,
                             Mat results,
                             int flags)
        Predicts responses for input samples and returns a float type.
        オーバーライド:
        クラス StatModel 内の predict
        引数:
        samples - 予測アルゴリズムへの入力データ。行列 [m x n] で、各行は分類対象となる1つのオブジェクトの変数(特徴)を含む。データ型は CV_32F とする。
        results - 予測されたラベル。型 CV_32S の列行列として返される。
        flags - 未使用。
        戻り値:
        自動生成
      • predict

        public float predict​(Mat samples,
                             Mat results)
        Predicts responses for input samples and returns a float type.
        オーバーライド:
        クラス StatModel 内の predict
        引数:
        samples - 予測アルゴリズムへの入力データ。行列 [m x n] で、各行は分類対象となる1つのオブジェクトの変数(特徴)を含む。データ型は CV_32F とする。
        results - 予測されたラベル。型 CV_32S の列行列として返される。
        戻り値:
        自動生成
      • predict

        public float predict​(Mat samples)
        Predicts responses for input samples and returns a float type.
        オーバーライド:
        クラス StatModel 内の predict
        引数:
        samples - 予測アルゴリズムへの入力データ。行列 [m x n] で、各行は分類対象となる1つのオブジェクトの変数(特徴)を含む。データ型は CV_32F とする。
        戻り値:
        自動生成
      • get_learnt_thetas

        public Mat get_learnt_thetas()
        This function returns the trained parameters arranged across rows. For a two class classification problem, it returns a row matrix. It returns learnt parameters of the Logistic Regression as a matrix of type CV_32F.
        戻り値:
        自動生成
      • create

        public static LogisticRegression create()
        Creates empty model. Creates Logistic Regression model with parameters given.
        戻り値:
        自動生成
      • load

        public static LogisticRegression load​(java.lang.String filepath,
                                              java.lang.String nodeName)
        Loads and creates a serialized LogisticRegression from a file Use LogisticRegression::save to serialize and store an LogisticRegression to disk. Load the LogisticRegression 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 - シリアライズされた LogisticRegression へのパス
        nodeName - 分類器を含むノードの名前
        戻り値:
        自動生成
      • load

        public static LogisticRegression load​(java.lang.String filepath)
        Loads and creates a serialized LogisticRegression from a file Use LogisticRegression::save to serialize and store an LogisticRegression to disk. Load the LogisticRegression 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 - シリアライズされた LogisticRegression へのパス
        戻り値:
        自動生成