OpenCV for Unity 2.6.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
Implements Logistic Regression classifier. More...
Public Member Functions | |
Mat | get_learnt_thetas () |
This function returns the trained parameters arranged across rows. | |
int | getIterations () |
double | getLearningRate () |
int | getMiniBatchSize () |
int | getRegularization () |
TermCriteria | getTermCriteria () |
double double double epsilon | getTermCriteriaAsValueTuple () |
Vec3d | getTermCriteriaAsVec3d () |
int | getTrainMethod () |
override float | predict (Mat samples) |
Predicts responses for input samples and returns a float type. | |
override float | predict (Mat samples, Mat results) |
Predicts responses for input samples and returns a float type. | |
override float | predict (Mat samples, Mat results, int flags) |
Predicts responses for input samples and returns a float type. | |
void | setIterations (int val) |
void | setLearningRate (double val) |
void | setMiniBatchSize (int val) |
void | setRegularization (int val) |
void | setTermCriteria (in Vec3d val) |
void | setTermCriteria (in(double type, double maxCount, double epsilon) val) |
void | setTermCriteria (TermCriteria val) |
void | setTrainMethod (int val) |
Public Member Functions inherited from OpenCVForUnity.MlModule.StatModel | |
float | calcError (TrainData data, bool test, Mat resp) |
Computes error on the training or test dataset. | |
override bool | empty () |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. | |
int | getVarCount () |
Returns the number of variables in training samples. | |
bool | isClassifier () |
Returns true if the model is classifier. | |
bool | isTrained () |
Returns true if the model is trained. | |
bool | train (Mat samples, int layout, Mat responses) |
Trains the statistical model. | |
bool | train (TrainData trainData) |
Trains the statistical model. | |
bool | train (TrainData trainData, int flags) |
Trains the statistical model. | |
Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
virtual void | clear () |
Clears the algorithm state. | |
virtual string | getDefaultName () |
IntPtr | getNativeObjAddr () |
void | save (string filename) |
Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
void | Dispose () |
void | ThrowIfDisposed () |
Static Public Member Functions | |
static new LogisticRegression | __fromPtr__ (IntPtr addr) |
static LogisticRegression | create () |
Creates empty model. | |
static LogisticRegression | load (string filepath) |
Loads and creates a serialized LogisticRegression from a file. | |
static LogisticRegression | load (string filepath, string nodeName) |
Loads and creates a serialized LogisticRegression from a file. | |
Static Public Member Functions inherited from OpenCVForUnity.MlModule.StatModel | |
static new StatModel | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
static Algorithm | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
Public Attributes | |
double double | maxCount |
double | type |
Static Public Attributes | |
const int | BATCH = 0 |
const int | MINI_BATCH = 1 |
const int | REG_DISABLE = -1 |
const int | REG_L1 = 0 |
const int | REG_L2 = 1 |
Static Public Attributes inherited from OpenCVForUnity.MlModule.StatModel | |
const int | COMPRESSED_INPUT = 2 |
const int | PREPROCESSED_INPUT = 4 |
const int | RAW_OUTPUT = 1 |
const int | UPDATE_MODEL = 1 |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.MlModule.StatModel | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject | |
DisposableOpenCVObject () | |
DisposableOpenCVObject (bool isEnabledDispose) | |
DisposableOpenCVObject (IntPtr ptr) | |
DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose) | |
Protected Member Functions inherited from OpenCVForUnity.DisposableObject | |
DisposableObject () | |
DisposableObject (bool isEnabledDispose) | |
Additional Inherited Members | |
Package Functions inherited from OpenCVForUnity.MlModule.StatModel | |
Package Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject | |
Properties inherited from OpenCVForUnity.DisposableObject | |
bool | IsDisposed [get, protected set] |
bool | IsEnabledDispose [get, set] |
Implements Logistic Regression classifier.
|
static |
|
static |
Creates empty model.
Creates Logistic Regression model with parameters given.
|
protectedvirtual |
Reimplemented from OpenCVForUnity.CoreModule.Algorithm.
Mat OpenCVForUnity.MlModule.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.
int OpenCVForUnity.MlModule.LogisticRegression.getIterations | ( | ) |
double OpenCVForUnity.MlModule.LogisticRegression.getLearningRate | ( | ) |
int OpenCVForUnity.MlModule.LogisticRegression.getMiniBatchSize | ( | ) |
int OpenCVForUnity.MlModule.LogisticRegression.getRegularization | ( | ) |
TermCriteria OpenCVForUnity.MlModule.LogisticRegression.getTermCriteria | ( | ) |
double double double epsilon OpenCVForUnity.MlModule.LogisticRegression.getTermCriteriaAsValueTuple | ( | ) |
Vec3d OpenCVForUnity.MlModule.LogisticRegression.getTermCriteriaAsVec3d | ( | ) |
int OpenCVForUnity.MlModule.LogisticRegression.getTrainMethod | ( | ) |
|
static |
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 | path to serialized LogisticRegression |
nodeName | name of node containing the classifier |
|
static |
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 | path to serialized LogisticRegression |
nodeName | name of node containing the classifier |
|
virtual |
Predicts responses for input samples and returns a float type.
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. |
results | Predicted labels as a column matrix of type CV_32S. |
flags | Not used. |
Reimplemented from OpenCVForUnity.MlModule.StatModel.
|
virtual |
Predicts responses for input samples and returns a float type.
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. |
results | Predicted labels as a column matrix of type CV_32S. |
flags | Not used. |
Reimplemented from OpenCVForUnity.MlModule.StatModel.
|
virtual |
Predicts responses for input samples and returns a float type.
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. |
results | Predicted labels as a column matrix of type CV_32S. |
flags | Not used. |
Reimplemented from OpenCVForUnity.MlModule.StatModel.
void OpenCVForUnity.MlModule.LogisticRegression.setIterations | ( | int | val | ) |
void OpenCVForUnity.MlModule.LogisticRegression.setLearningRate | ( | double | val | ) |
void OpenCVForUnity.MlModule.LogisticRegression.setMiniBatchSize | ( | int | val | ) |
void OpenCVForUnity.MlModule.LogisticRegression.setRegularization | ( | int | val | ) |
void OpenCVForUnity.MlModule.LogisticRegression.setTermCriteria | ( | in Vec3d | val | ) |
void OpenCVForUnity.MlModule.LogisticRegression.setTermCriteria | ( | in(double type, double maxCount, double epsilon) | val | ) |
void OpenCVForUnity.MlModule.LogisticRegression.setTermCriteria | ( | TermCriteria | val | ) |
void OpenCVForUnity.MlModule.LogisticRegression.setTrainMethod | ( | int | val | ) |
|
static |
double double OpenCVForUnity.MlModule.LogisticRegression.maxCount |
|
static |
|
static |
|
static |
|
static |
double OpenCVForUnity.MlModule.LogisticRegression.type |