[][src]Module opencv::ml

Machine Learning

The Machine Learning Library (MLL) is a set of classes and functions for statistical classification, regression, and clustering of data.

Most of the classification and regression algorithms are implemented as C++ classes. As the algorithms have different sets of features (like an ability to handle missing measurements or categorical input variables), there is a little common ground between the classes. This common ground is defined by the class cv::ml::StatModel that all the other ML classes are derived from.

See detailed overview here: @ref ml_intro.

Structs

DTrees_Node

The class represents a decision tree node.

DTrees_Split

The class represents split in a decision tree.

ParamGrid

The structure represents the logarithmic grid range of statmodel parameters.

Constants

ANN_MLP_ANNEAL

The simulated annealing algorithm. See Kirkpatrick83 for details.

ANN_MLP_BACKPROP

The back-propagation algorithm.

ANN_MLP_GAUSSIAN
ANN_MLP_IDENTITY
ANN_MLP_LEAKYRELU
ANN_MLP_NO_INPUT_SCALE
ANN_MLP_NO_OUTPUT_SCALE
ANN_MLP_RELU
ANN_MLP_RPROP

The RPROP algorithm. See RPROP93 for details.

ANN_MLP_SIGMOID_SYM
ANN_MLP_UPDATE_WEIGHTS
Boost_DISCRETE

Discrete AdaBoost.

Boost_GENTLE

Gentle AdaBoost. It puts less weight on outlier data points and for that

Boost_LOGIT

LogitBoost. It can produce good regression fits.

Boost_REAL

Real AdaBoost. It is a technique that utilizes confidence-rated predictions

COL_SAMPLE

each training sample occupies a column of samples

DTrees_PREDICT_AUTO
DTrees_PREDICT_MASK
DTrees_PREDICT_MAX_VOTE
DTrees_PREDICT_SUM
EM_COV_MAT_DEFAULT
EM_COV_MAT_DIAGONAL
EM_COV_MAT_GENERIC
EM_COV_MAT_SPHERICAL
EM_DEFAULT_MAX_ITERS
EM_DEFAULT_NCLUSTERS
EM_START_AUTO_STEP
EM_START_E_STEP
EM_START_M_STEP
KNearest_BRUTE_FORCE
KNearest_KDTREE
LogisticRegression_BATCH
LogisticRegression_MINI_BATCH

Set MiniBatchSize to a positive integer when using this method.

LogisticRegression_REG_DISABLE

Regularization disabled

LogisticRegression_REG_L1

%L1 norm

LogisticRegression_REG_L2

%L2 norm

ROW_SAMPLE

each training sample is a row of samples

SVMSGD_ASGD

Average Stochastic Gradient Descent

SVMSGD_HARD_MARGIN

More accurate for the case of linearly separable sets.

SVMSGD_SGD

Stochastic Gradient Descent

SVMSGD_SOFT_MARGIN

General case, suits to the case of non-linearly separable sets, allows outliers.

SVM_C
SVM_CHI2
SVM_COEF
SVM_CUSTOM
SVM_C_SVC
SVM_DEGREE
SVM_EPS_SVR
SVM_GAMMA
SVM_INTER
SVM_LINEAR
SVM_NU
SVM_NU_SVC
SVM_NU_SVR
SVM_ONE_CLASS
SVM_P
SVM_POLY
SVM_RBF
SVM_SIGMOID
StatModel_COMPRESSED_INPUT
StatModel_PREPROCESSED_INPUT
StatModel_RAW_OUTPUT

makes the method return the raw results (the sum), not the class label

StatModel_UPDATE_MODEL
TEST_ERROR
TRAIN_ERROR
VAR_CATEGORICAL

categorical variables

VAR_NUMERICAL

same as VAR_ORDERED

VAR_ORDERED

ordered variables

Traits

ANN_MLP

Artificial Neural Networks - Multi-Layer Perceptrons.

Boost

Boosted tree classifier derived from DTrees

DTrees

The class represents a single decision tree or a collection of decision trees.

EM

The class implements the Expectation Maximization algorithm.

KNearest

The class implements K-Nearest Neighbors model

LogisticRegression

Implements Logistic Regression classifier.

NormalBayesClassifier

Bayes classifier for normally distributed data.

RTrees

The class implements the random forest predictor.

SVM

Support Vector Machines.

SVMSGD


Stochastic Gradient Descent SVM Classifier *

SVM_Kernel
StatModel

Base class for statistical models in OpenCV ML.

TrainData

Class encapsulating training data.

Functions

create_concentric_spheres_test_set

Creates test set

rand_mv_normal

Generates sample from multivariate normal distribution