123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- //
- // This file is auto-generated. Please don't modify it!
- //
- #pragma once
- #ifdef __cplusplus
- //#import "opencv.hpp"
- #import "opencv2/ml.hpp"
- #else
- #define CV_EXPORTS
- #endif
- #import <Foundation/Foundation.h>
- #import "StatModel.h"
- @class Mat;
- @class TermCriteria;
- // C++: enum Methods (cv.ml.LogisticRegression.Methods)
- typedef NS_ENUM(int, Methods) {
- BATCH = 0,
- MINI_BATCH = 1
- };
- // C++: enum RegKinds (cv.ml.LogisticRegression.RegKinds)
- typedef NS_ENUM(int, RegKinds) {
- REG_DISABLE = -1,
- REG_L1 = 0,
- REG_L2 = 1
- };
- NS_ASSUME_NONNULL_BEGIN
- // C++: class LogisticRegression
- /**
- * Implements Logistic Regression classifier.
- *
- * @see REF: ml_intro_lr
- *
- * Member of `Ml`
- */
- CV_EXPORTS @interface LogisticRegression : StatModel
- #ifdef __cplusplus
- @property(readonly)cv::Ptr<cv::ml::LogisticRegression> nativePtrLogisticRegression;
- #endif
- #ifdef __cplusplus
- - (instancetype)initWithNativePtr:(cv::Ptr<cv::ml::LogisticRegression>)nativePtr;
- + (instancetype)fromNative:(cv::Ptr<cv::ml::LogisticRegression>)nativePtr;
- #endif
- #pragma mark - Methods
- //
- // double cv::ml::LogisticRegression::getLearningRate()
- //
- /**
- * @see `-setLearningRate:`
- */
- - (double)getLearningRate NS_SWIFT_NAME(getLearningRate());
- //
- // void cv::ml::LogisticRegression::setLearningRate(double val)
- //
- /**
- * getLearningRate @see `-getLearningRate:`
- */
- - (void)setLearningRate:(double)val NS_SWIFT_NAME(setLearningRate(val:));
- //
- // int cv::ml::LogisticRegression::getIterations()
- //
- /**
- * @see `-setIterations:`
- */
- - (int)getIterations NS_SWIFT_NAME(getIterations());
- //
- // void cv::ml::LogisticRegression::setIterations(int val)
- //
- /**
- * getIterations @see `-getIterations:`
- */
- - (void)setIterations:(int)val NS_SWIFT_NAME(setIterations(val:));
- //
- // int cv::ml::LogisticRegression::getRegularization()
- //
- /**
- * @see `-setRegularization:`
- */
- - (int)getRegularization NS_SWIFT_NAME(getRegularization());
- //
- // void cv::ml::LogisticRegression::setRegularization(int val)
- //
- /**
- * getRegularization @see `-getRegularization:`
- */
- - (void)setRegularization:(int)val NS_SWIFT_NAME(setRegularization(val:));
- //
- // int cv::ml::LogisticRegression::getTrainMethod()
- //
- /**
- * @see `-setTrainMethod:`
- */
- - (int)getTrainMethod NS_SWIFT_NAME(getTrainMethod());
- //
- // void cv::ml::LogisticRegression::setTrainMethod(int val)
- //
- /**
- * getTrainMethod @see `-getTrainMethod:`
- */
- - (void)setTrainMethod:(int)val NS_SWIFT_NAME(setTrainMethod(val:));
- //
- // int cv::ml::LogisticRegression::getMiniBatchSize()
- //
- /**
- * @see `-setMiniBatchSize:`
- */
- - (int)getMiniBatchSize NS_SWIFT_NAME(getMiniBatchSize());
- //
- // void cv::ml::LogisticRegression::setMiniBatchSize(int val)
- //
- /**
- * getMiniBatchSize @see `-getMiniBatchSize:`
- */
- - (void)setMiniBatchSize:(int)val NS_SWIFT_NAME(setMiniBatchSize(val:));
- //
- // TermCriteria cv::ml::LogisticRegression::getTermCriteria()
- //
- /**
- * @see `-setTermCriteria:`
- */
- - (TermCriteria*)getTermCriteria NS_SWIFT_NAME(getTermCriteria());
- //
- // void cv::ml::LogisticRegression::setTermCriteria(TermCriteria val)
- //
- /**
- * getTermCriteria @see `-getTermCriteria:`
- */
- - (void)setTermCriteria:(TermCriteria*)val NS_SWIFT_NAME(setTermCriteria(val:));
- //
- // float cv::ml::LogisticRegression::predict(Mat samples, Mat& results = Mat(), int flags = 0)
- //
- /**
- * Predicts responses for input samples and returns a float type.
- *
- * @param samples The input data for the prediction algorithm. Matrix [m x n], where each row
- * contains variables (features) of one object being classified. Should have data type CV_32F.
- * @param results Predicted labels as a column matrix of type CV_32S.
- * @param flags Not used.
- */
- - (float)predict:(Mat*)samples results:(Mat*)results flags:(int)flags NS_SWIFT_NAME(predict(samples:results:flags:));
- /**
- * Predicts responses for input samples and returns a float type.
- *
- * @param samples The input data for the prediction algorithm. Matrix [m x n], where each row
- * contains variables (features) of one object being classified. Should have data type CV_32F.
- * @param results Predicted labels as a column matrix of type CV_32S.
- */
- - (float)predict:(Mat*)samples results:(Mat*)results NS_SWIFT_NAME(predict(samples:results:));
- /**
- * Predicts responses for input samples and returns a float type.
- *
- * @param samples The input data for the prediction algorithm. Matrix [m x n], where each row
- * contains variables (features) of one object being classified. Should have data type CV_32F.
- */
- - (float)predict:(Mat*)samples NS_SWIFT_NAME(predict(samples:));
- //
- // Mat cv::ml::LogisticRegression::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.
- */
- - (Mat*)get_learnt_thetas NS_SWIFT_NAME(get_learnt_thetas());
- //
- // static Ptr_LogisticRegression cv::ml::LogisticRegression::create()
- //
- /**
- * Creates empty model.
- *
- * Creates Logistic Regression model with parameters given.
- */
- + (LogisticRegression*)create NS_SWIFT_NAME(create());
- //
- // static Ptr_LogisticRegression cv::ml::LogisticRegression::load(String filepath, String nodeName = String())
- //
- /**
- * 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
- *
- * @param filepath path to serialized LogisticRegression
- * @param nodeName name of node containing the classifier
- */
- + (LogisticRegression*)load:(NSString*)filepath nodeName:(NSString*)nodeName NS_SWIFT_NAME(load(filepath: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
- *
- * @param filepath path to serialized LogisticRegression
- */
- + (LogisticRegression*)load:(NSString*)filepath NS_SWIFT_NAME(load(filepath:));
- @end
- NS_ASSUME_NONNULL_END
|