ml
All modules / ml
\
ml_ANN_MLP_ActivationFunctionsclasspossible activation functions
ml_ANN_MLP_createfunctionCreates empty model
ml_ANN_MLP_loadfunctionLoads and creates a serialized ANN from a file
ml_ANN_MLP_TrainFlagsclassml_ANN_MLP_TrainFlags: Train options
ml_ANN_MLP_TrainingMethodsclassAvailable training methods
ml_Boostclass\
ml_Boost_createfunctionCreates the empty model.
ml_Boost_loadfunctionLoads and creates a serialized Boost from a file
ml_Boost_TypesclassBoosting type.
ml_DTreesclass\
ml_DTrees_createfunctionCreates the empty model
ml_DTrees_FlagsclassPredict options
ml_DTrees_loadfunctionLoads and creates a serialized DTrees from a file
ml_EMclass\
ml_EM_createfunctionCreates empty %EM model.
ml_EM_loadfunctionLoads and creates a serialized EM from a file
ml_EM_TypesclassType of covariation matrices
ml_ErrorTypesclassml_ErrorTypes: %Error types
ml_KNearestclass\
ml_KNearest_createfunctionCreates the empty model
ml_KNearest_loadfunctionLoads and creates a serialized knearest from a file
ml_KNearest_TypesclassImplementations of KNearest algorithm
ml_LogisticRegressionclass\
ml_LogisticRegression_createfunctionCreates empty model.
ml_LogisticRegression_loadfunctionLoads and creates a serialized LogisticRegression from a file
ml_LogisticRegression_MethodsclassTraining methods
ml_LogisticRegression_RegKindsclassRegularization kinds
ml_NormalBayesClassifierclass\
ml_NormalBayesClassifier_createfunctionCreates empty model
ml_NormalBayesClassifier_loadfunctionLoads and creates a serialized NormalBayesClassifier from a file
ml_ParamGridclassThe structure represents the logarithmic grid range of statmodel parameters.
ml_ParamGrid_createfunctionCreates a ParamGrid Ptr that can be given to the %SVM::trainAuto method
ml_RTreesclass\
ml_RTrees_createfunctionCreates the empty model.
ml_RTrees_loadfunctionLoads and creates a serialized RTree from a file
ml_SampleTypesclassml_SampleTypes: Sample types
ml_StatModelclassBase class for statistical models in OpenCV ML.
ml_StatModel_FlagsclassPredict options
ml_SVMclass\
ml_SVM_createfunctionCreates empty model.
ml_SVM_getDefaultGridPtrfunctionGenerates a grid for %SVM parameters.
ml_SVM_KernelTypesclass%SVM kernel type
ml_SVM_loadfunctionLoads and creates a serialized svm from a file
ml_SVM_ParamTypesclass%SVM params type
ml_SVM_Typesclassml_SVM_Types: %SVM type
ml_SVMSGDclass\
ml_SVMSGD_createfunctionCreates empty model.
ml_SVMSGD_loadfunctionLoads and creates a serialized SVMSGD from a file
ml_SVMSGD_MarginTypeclassml_SVMSGD_MarginType: Margin type.
ml_SVMSGD_SvmsgdTypeclassSVMSGD type.
ml_TrainDataclassClass encapsulating training data.
ml_TrainData_createfunctionCreates training data from in-memory arrays.
ml_TrainData_getSubMatrixfunctionExtract from matrix rows/cols specified by passed indexes.
ml_TrainData_getSubVectorfunctionExtract from 1D vector elements specified by passed indexes.
ml_VariableTypesclassml_VariableTypes: Variable types
No matches. Try an algorithm name, a module, or a shorter phrase.
Constants
Use the named constant from cv. In particular, OpenCV 5 matrix type codes differ from OpenCV 4.
ml_VAR_NUMERICALsame as VAR_ORDERED
ml_VAR_ORDEREDordered variables
ml_VAR_CATEGORICALcategorical variables
ml_TEST_ERRORml test error constant (0), defined by OpenCV for cv::ml.
ml_TRAIN_ERRORml train error constant (1), defined by OpenCV for cv::ml.
ml_ROW_SAMPLEeach training sample is a row of samples
ml_COL_SAMPLEeach training sample occupies a column of samples
ml_StatModel_UPDATE_MODELml stat model update model constant (1), defined by OpenCV for cv::ml::StatModel.
ml_STAT_MODEL_UPDATE_MODELml stat model update model constant (1), defined by OpenCV for cv::ml::StatModel.
ml_StatModel_RAW_OUTPUTmakes the method return the raw results (the sum), not the class label
ml_STAT_MODEL_RAW_OUTPUTmakes the method return the raw results (the sum), not the class label
ml_StatModel_COMPRESSED_INPUTmakes the method return the raw results (the sum), not the class label
ml_STAT_MODEL_COMPRESSED_INPUTmakes the method return the raw results (the sum), not the class label
ml_StatModel_PREPROCESSED_INPUTml stat model preprocessed input constant (4), defined by OpenCV for cv::ml::StatModel.
ml_STAT_MODEL_PREPROCESSED_INPUTml stat model preprocessed input constant (4), defined by OpenCV for cv::ml::StatModel.
ml_KNearest_BRUTE_FORCEml knearest brute force constant (1), defined by OpenCV for cv::ml::KNearest.
ml_KNEAREST_BRUTE_FORCEml knearest brute force constant (1), defined by OpenCV for cv::ml::KNearest.
ml_KNearest_KDTREEml knearest kdtree constant (2), defined by OpenCV for cv::ml::KNearest.
ml_KNEAREST_KDTREEml knearest kdtree constant (2), defined by OpenCV for cv::ml::KNearest.
ml_SVM_C_SVCC-Support Vector Classification. n-class classification (n
\geq2), allows imperfect separation of classes with penalty multiplier C for outliers.ml_SVM_NU_SVC\nu-Support Vector Classification. n-class classification with possible imperfect separation. Parameter\nu(in the range 0..1, the larger the value, the smoother the decision boundary) is used instead of C.ml_SVM_ONE_CLASSDistribution Estimation (One-class %SVM). All the training data are from the same class, %SVM builds a boundary that separates the class from the rest of the feature space.
ml_SVM_EPS_SVR\epsilon-Support Vector Regression. The distance between feature vectors from the training set and the fitting hyper-plane must be less than p. For outliers the penalty multiplier C is used.ml_SVM_NU_SVR\nu-Support Vector Regression.\nuis used instead of p. See [LibSVM] for details.ml_SVM_CUSTOMReturned by SVM::getKernelType in case when custom kernel has been set
ml_SVM_LINEARLinear kernel. No mapping is done, linear discrimination (or regression) is done in the original feature space. It is the fastest option.
K(x_i, x_j) = x_i^T x_j.ml_SVM_POLYPolynomial kernel:
K(x_i, x_j) = (\gamma x_i^T x_j + coef0)^{degree}, \gamma > 0.ml_SVM_RBFExponential Chi2 kernel, similar to the RBF kernel:
ml_SVM_SIGMOIDSigmoid kernel:
K(x_i, x_j) = \tanh(\gamma x_i^T x_j + coef0).ml_SVM_CHI2Exponential Chi2 kernel, similar to the RBF kernel:
K(x_i, x_j) = e^{-\gamma \chi^2(x_i,x_j)}, \chi^2(x_i,x_j) = (x_i-x_j)^2/(x_i+x_j), \gamma > 0.ml_SVM_INTERHistogram intersection kernel. A fast kernel.
K(x_i, x_j) = min(x_i,x_j).ml_SVM_Cml svm c constant (0), defined by OpenCV for cv::ml::SVM.
ml_SVM_GAMMAml svm gamma constant (1), defined by OpenCV for cv::ml::SVM.
ml_SVM_Pml svm p constant (2), defined by OpenCV for cv::ml::SVM.
ml_SVM_NUml svm nu constant (3), defined by OpenCV for cv::ml::SVM.
ml_SVM_COEFml svm coef constant (4), defined by OpenCV for cv::ml::SVM.
ml_SVM_DEGREEml svm degree constant (5), defined by OpenCV for cv::ml::SVM.
ml_EM_COV_MAT_SPHERICALA scaled identity matrix
\mu_k * I. There is the only parameter\mu_kto be estimated for each matrix. The option may be used in special cases, when the constraint is relevant, or as a first step in the optimization (for example in case when the data is preprocessed with PCA). The results of such preliminary estimation may be passed again to the optimization procedure, this time with covMatType=EM::COV_MAT_DIAGONAL.ml_EM_COV_MAT_DIAGONALA symmetric positively defined matrix. The number of free
ml_EM_COV_MAT_GENERICA symmetric positively defined matrix. The number of free parameters in each matrix is about
d^2/2. It is not recommended to use this option, unless there is pretty accurate initial estimation of the parameters and/or a huge number of training samples.ml_EM_COV_MAT_DEFAULTml em cov mat default constant (COV_MAT_DIAGONAL), defined by OpenCV for cv::ml::EM.
ml_EM_DEFAULT_NCLUSTERSDefault parameters
ml_EM_DEFAULT_MAX_ITERSDefault parameters
ml_EM_START_E_STEPThe initial step
ml_EM_START_M_STEPThe initial step
ml_EM_START_AUTO_STEPThe initial step
ml_DTrees_PREDICT_AUTOPredict options
ml_DTREES_PREDICT_AUTOPredict options
ml_DTrees_PREDICT_SUMPredict options
ml_DTREES_PREDICT_SUMPredict options
ml_DTrees_PREDICT_MAX_VOTEPredict options
ml_DTREES_PREDICT_MAX_VOTEPredict options
ml_DTrees_PREDICT_MASKPredict options
ml_DTREES_PREDICT_MASKPredict options
ml_Boost_DISCRETEDiscrete AdaBoost.
ml_BOOST_DISCRETEDiscrete AdaBoost.
ml_Boost_REALReal AdaBoost. It is a technique that utilizes confidence-rated predictions
ml_BOOST_REALReal AdaBoost. It is a technique that utilizes confidence-rated predictions
ml_Boost_LOGITLogitBoost. It can produce good regression fits.
ml_BOOST_LOGITLogitBoost. It can produce good regression fits.
ml_Boost_GENTLEGentle AdaBoost. It puts less weight on outlier data points and for that
ml_BOOST_GENTLEGentle AdaBoost. It puts less weight on outlier data points and for that
ml_ANN_MLP_BACKPROPThe back-propagation algorithm.
ml_ANN_MLP_RPROPThe RPROP algorithm. See [RPROP93] for details.
ml_ANN_MLP_ANNEALThe simulated annealing algorithm. See [Kirkpatrick83] for details.
ml_ANN_MLP_IDENTITYIdentity function:
f(x)=xml_ANN_MLP_SIGMOID_SYMSymmetrical sigmoid:
f(x)=\beta*(1-e^{-\alpha x})/(1+e^{-\alpha x})Note: If you are using the default sigmoid activation function with the default parameter values fparam1=0 and fparam2=0 then the function used is y = 1.7159*tanh(2/3 * x), so the output will range from [-1.7159, 1.7159], instead of [0,1].
ml_ANN_MLP_GAUSSIANGaussian function:
f(x)=\beta e^{-\alpha x*x}ml_ANN_MLP_RELUReLU function:
f(x)=max(0,x)ml_ANN_MLP_LEAKYRELULeaky ReLU function: for x>0
f(x)=xand x<=0f(x)=\alpha xml_ANN_MLP_UPDATE_WEIGHTSUpdate the network weights, rather than compute them from scratch. In the latter case the weights are initialized using the Nguyen-Widrow algorithm.
ml_ANN_MLP_NO_INPUT_SCALEDo not normalize the input vectors. If this flag is not set, the training algorithm normalizes each input feature independently, shifting its mean value to 0 and making the standard deviation equal to 1. If the network is assumed to be updated frequently, the new training data could be much different from original one. In this case, you should take care of proper normalization.
ml_ANN_MLP_NO_OUTPUT_SCALEDo not normalize the output vectors. If the flag is not set, the training algorithm normalizes each output feature independently, by transforming it to the certain range depending on the used activation function.
ml_LogisticRegression_REG_DISABLERegularization disabled
ml_LOGISTIC_REGRESSION_REG_DISABLERegularization disabled
ml_LogisticRegression_REG_L1ml_LogisticRegression_REG_L1: %L1 norm
ml_LOGISTIC_REGRESSION_REG_L1ml_LOGISTIC_REGRESSION_REG_L1: %L1 norm
ml_LogisticRegression_REG_L2ml_LogisticRegression_REG_L2: %L2 norm
ml_LOGISTIC_REGRESSION_REG_L2ml_LOGISTIC_REGRESSION_REG_L2: %L2 norm
ml_LogisticRegression_BATCHml logistic regression batch constant (0), defined by OpenCV for cv::ml::LogisticRegression.
ml_LOGISTIC_REGRESSION_BATCHml logistic regression batch constant (0), defined by OpenCV for cv::ml::LogisticRegression.
ml_LogisticRegression_MINI_BATCHSet MiniBatchSize to a positive integer when using this method.
ml_LOGISTIC_REGRESSION_MINI_BATCHSet MiniBatchSize to a positive integer when using this method.
ml_SVMSGD_SGDStochastic Gradient Descent
ml_SVMSGD_ASGDAverage Stochastic Gradient Descent
ml_SVMSGD_SOFT_MARGINGeneral case, suits to the case of non-linearly separable sets, allows outliers.
ml_SVMSGD_HARD_MARGINMore accurate for the case of linearly separable sets.