Machine Learning#
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: ml_intro.
Classes#
Name |
Description |
|---|---|
|
Artificial Neural Networks - Multi-Layer Perceptrons. View details |
|
Boosted tree classifier derived from DTrees. View details |
|
The class represents a single decision tree or a collection of decision trees. View details |
|
The class implements the Expectation Maximization algorithm. View details |
|
The class implements K-Nearest Neighbors model. View details |
Implements Logistic Regression classifier. View details |
|
Bayes classifier for normally distributed data. View details |
|
|
The structure represents the logarithmic grid range of statmodel parameters. View details |
|
The class implements the random forest predictor. View details |
This class declares example interface for system state used in simulated annealing optimization algorithm. View details |
|
|
Base class for statistical models in OpenCV ML. View details |
|
Support Vector Machines. View details |
|
Stochastic Gradient Descent SVM classifier. View details |
|
Class encapsulating training data. View details |
Enumerations#
enum cv::ml::ErrorTypes {
cv::ml::TEST_ERROR = 0,
cv::ml::TRAIN_ERROR = 1
}Error types View details
enum cv::ml::SampleTypes {
cv::ml::ROW_SAMPLE = 0,
cv::ml::COL_SAMPLE = 1
}Sample types. View details
enum cv::ml::VariableTypes {
cv::ml::VAR_NUMERICAL =0,
cv::ml::VAR_ORDERED =0,
cv::ml::VAR_CATEGORICAL =1
}Variable types. View details
Typedef Documentation#
ANN_MLP_ANNEAL#
typedef ANN_MLP cv::ml::ANN_MLP_ANNEAL
#include <opencv2/ml.hpp>
Enumeration Type Documentation#
ErrorTypes#
enum cv::ml::ErrorTypes
#include <opencv2/ml.hpp>
Error types
Enumerator:
|
|
SampleTypes#
enum cv::ml::SampleTypes
#include <opencv2/ml.hpp>
Sample types.
Enumerator:
|
each training sample is a row of samples |
|
each training sample occupies a column of samples |
VariableTypes#
#include <opencv2/ml.hpp>
Variable types.
Enumerator:
|
same as VAR_ORDERED |
|
ordered variables |
|
categorical variables |
Function Documentation#
createConcentricSpheresTestSet()#
void cv::ml::createConcentricSpheresTestSet(
int nsamples,
int nfeatures,
int nclasses,
OutputArray samples,
OutputArray responses )
#include <opencv2/ml.hpp>
Creates test set.
Here is the call graph for this function:
randMVNormal()#
void cv::ml::randMVNormal(
InputArray mean,
InputArray cov,
int nsamples,
OutputArray samples )
#include <opencv2/ml.hpp>
Generates sample from multivariate normal distribution.
Parameters
mean— an average row vectorcov— symmetric covariation matrixnsamples— returned samples countsamples— returned samples array
Here is the call graph for this function:
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() )
#include <opencv2/ml.hpp>
The class implements simulated annealing for optimization.
[166] for details
Parameters
solverSystem— optimization system (see SimulatedAnnealingSolverSystem)initialTemperature— initial temperaturefinalTemperature— final temperaturecoolingRatio— temperature step multipliesiterationsPerStep— number of iterations per temperature changing steplastTemperature— optional output for last used temperaturerngEnergy— specify custom random numbers generator (cv::theRNG() by default)
Here is the call graph for this function: