OpenCV  4.0.0-pre
Open Source Computer Vision
Classes | Typedefs | Enumerations | Functions
Machine Learning

Classes

class  cv::ml::ANN_MLP
 Artificial Neural Networks - Multi-Layer Perceptrons. More...
 
class  cv::ml::Boost
 Boosted tree classifier derived from DTrees. More...
 
class  cv::ml::DTrees
 The class represents a single decision tree or a collection of decision trees. More...
 
class  cv::ml::EM
 The class implements the Expectation Maximization algorithm. More...
 
class  cv::ml::KNearest
 The class implements K-Nearest Neighbors model. More...
 
class  cv::ml::LogisticRegression
 Implements Logistic Regression classifier. More...
 
class  cv::ml::NormalBayesClassifier
 Bayes classifier for normally distributed data. More...
 
class  cv::ml::ParamGrid
 The structure represents the logarithmic grid range of statmodel parameters. More...
 
class  cv::ml::RTrees
 The class implements the random forest predictor. More...
 
struct  cv::ml::SimulatedAnnealingSolverSystem
 This class declares example interface for system state used in simulated annealing optimization algorithm. More...
 
class  cv::ml::StatModel
 Base class for statistical models in OpenCV ML. More...
 
class  cv::ml::SVM
 Support Vector Machines. More...
 
class  cv::ml::SVMSGD
 Stochastic Gradient Descent SVM classifier. More...
 
class  cv::ml::TrainData
 Class encapsulating training data. More...
 

Typedefs

typedef ANN_MLP cv::ml::ANN_MLP_ANNEAL
 

Enumerations

enum  cv::ml::ErrorTypes {
  cv::ml::TEST_ERROR = 0,
  cv::ml::TRAIN_ERROR = 1
}
 Error types More...
 
enum  cv::ml::SampleTypes {
  cv::ml::ROW_SAMPLE = 0,
  cv::ml::COL_SAMPLE = 1
}
 Sample types. More...
 
enum  cv::ml::VariableTypes {
  cv::ml::VAR_NUMERICAL =0,
  cv::ml::VAR_ORDERED =0,
  cv::ml::VAR_CATEGORICAL =1
}
 Variable types. More...
 

Functions

void cv::ml::createConcentricSpheresTestSet (int nsamples, int nfeatures, int nclasses, OutputArray samples, OutputArray responses)
 Creates test set. More...
 
void cv::ml::randMVNormal (InputArray mean, InputArray cov, int nsamples, OutputArray samples)
 Generates sample from multivariate normal distribution. More...
 
template<class SimulatedAnnealingSolverSystem >
int cv::ml::simulatedAnnealingSolver (SimulatedAnnealingSolverSystem &solverSystem, double initialTemperature, double finalTemperature, double coolingRatio, size_t iterationsPerStep, double *lastTemperature=NULL, cv::RNG &rngEnergy=cv::theRNG())
 The class implements simulated annealing for optimization. More...
 

Detailed Description

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: Machine Learning Overview.

Typedef Documentation

§ ANN_MLP_ANNEAL

Enumeration Type Documentation

§ ErrorTypes

Error types

Enumerator
TEST_ERROR 
Python: cv.ml.TEST_ERROR
TRAIN_ERROR 
Python: cv.ml.TRAIN_ERROR

§ SampleTypes

Sample types.

Enumerator
ROW_SAMPLE 
Python: cv.ml.ROW_SAMPLE

each training sample is a row of samples

COL_SAMPLE 
Python: cv.ml.COL_SAMPLE

each training sample occupies a column of samples

§ VariableTypes

Variable types.

Enumerator
VAR_NUMERICAL 
Python: cv.ml.VAR_NUMERICAL

same as VAR_ORDERED

VAR_ORDERED 
Python: cv.ml.VAR_ORDERED

ordered variables

VAR_CATEGORICAL 
Python: cv.ml.VAR_CATEGORICAL

categorical variables

Function Documentation

§ createConcentricSpheresTestSet()

void cv::ml::createConcentricSpheresTestSet ( int  nsamples,
int  nfeatures,
int  nclasses,
OutputArray  samples,
OutputArray  responses 
)

Creates test set.

§ randMVNormal()

void cv::ml::randMVNormal ( InputArray  mean,
InputArray  cov,
int  nsamples,
OutputArray  samples 
)

Generates sample from multivariate normal distribution.

Parameters
meanan average row vector
covsymmetric covariation matrix
nsamplesreturned samples count
samplesreturned samples array

§ simulatedAnnealingSolver()

template<class SimulatedAnnealingSolverSystem >
int cv::ml::simulatedAnnealingSolver ( SimulatedAnnealingSolverSystem solverSystem,
double  initialTemperature,
double  finalTemperature,
double  coolingRatio,
size_t  iterationsPerStep,
double *  lastTemperature = NULL,
cv::RNG rngEnergy = cv::theRNG() 
)

The class implements simulated annealing for optimization.

[97] for details

Parameters
solverSystemoptimization system (see SimulatedAnnealingSolverSystem)
initialTemperatureinitial temperature
finalTemperaturefinal temperature
coolingRatiotemperature step multiplies
iterationsPerStepnumber of iterations per temperature changing step
lastTemperatureoptional output for last used temperature
rngEnergyspecify custom random numbers generator (cv::theRNG() by default)