Table of Contents

Class LogisticRegression

Namespace
OpenCvSharp.ML
Assembly
OpenCvSharp.dll

Implements Logistic Regression classifier.

public class LogisticRegression : StatModel, IDisposable
Inheritance
LogisticRegression
Implements
Inherited Members

Properties

Iterations

Number of iterations.

LearningRate

Learning rate

MiniBatchSize

Specifies the number of training samples taken in each step of Mini-Batch Gradient. Descent. Will only be used if using LogisticRegression::MINI_BATCH training algorithm. It has to take values less than the total number of training samples.

Regularization

Kind of regularization to be applied. See LogisticRegression::RegKinds.

TermCriteria

Termination criteria of the training algorithm.

TrainMethod

Kind of training method used. See LogisticRegression::Methods.

Methods

Create()

Creates the empty model.

GetLearntThetas()

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.

Load(string)

Loads and creates a serialized model from a file.

LoadFromString(string)

Loads algorithm from a String.

Predict(InputArray, OutputArray, int)

Predicts responses for input samples and returns a float type.