OpenCV for Unity  2.6.3
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
OpenCVForUnity.MlModule.SVM Class Reference

Support Vector Machines. More...

Inheritance diagram for OpenCVForUnity.MlModule.SVM:
OpenCVForUnity.MlModule.StatModel OpenCVForUnity.CoreModule.Algorithm OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

int getType ()
 
void setType (int val)
 
double getGamma ()
 
void setGamma (double val)
 
double getCoef0 ()
 
void setCoef0 (double val)
 
double getDegree ()
 
void setDegree (double val)
 
double getC ()
 
void setC (double val)
 
double getNu ()
 
void setNu (double val)
 
double getP ()
 
void setP (double val)
 
Mat getClassWeights ()
 
void setClassWeights (Mat val)
 
TermCriteria getTermCriteria ()
 
void setTermCriteria (TermCriteria val)
 
int getKernelType ()
 
void setKernel (int kernelType)
 
bool trainAuto (Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid, ParamGrid degreeGrid, bool balanced)
 Trains an SVM with optimal parameters. More...
 
bool trainAuto (Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid, ParamGrid degreeGrid)
 Trains an SVM with optimal parameters. More...
 
bool trainAuto (Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid, ParamGrid coeffGrid)
 Trains an SVM with optimal parameters. More...
 
bool trainAuto (Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid, ParamGrid nuGrid)
 Trains an SVM with optimal parameters. More...
 
bool trainAuto (Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid, ParamGrid pGrid)
 Trains an SVM with optimal parameters. More...
 
bool trainAuto (Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid, ParamGrid gammaGrid)
 Trains an SVM with optimal parameters. More...
 
bool trainAuto (Mat samples, int layout, Mat responses, int kFold, ParamGrid Cgrid)
 Trains an SVM with optimal parameters. More...
 
bool trainAuto (Mat samples, int layout, Mat responses, int kFold)
 Trains an SVM with optimal parameters. More...
 
bool trainAuto (Mat samples, int layout, Mat responses)
 Trains an SVM with optimal parameters. More...
 
Mat getSupportVectors ()
 Retrieves all the support vectors. More...
 
Mat getUncompressedSupportVectors ()
 Retrieves all the uncompressed support vectors of a linear SVM. More...
 
double getDecisionFunction (int i, Mat alpha, Mat svidx)
 Retrieves the decision function. More...
 
- Public Member Functions inherited from OpenCVForUnity.MlModule.StatModel
int getVarCount ()
 Returns the number of variables in training samples. More...
 
override bool empty ()
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
bool isTrained ()
 Returns true if the model is trained. More...
 
bool isClassifier ()
 Returns true if the model is classifier. More...
 
bool train (TrainData trainData, int flags)
 Trains the statistical model. More...
 
bool train (TrainData trainData)
 Trains the statistical model. More...
 
bool train (Mat samples, int layout, Mat responses)
 Trains the statistical model. More...
 
float calcError (TrainData data, bool test, Mat resp)
 Computes error on the training or test dataset. More...
 
virtual float predict (Mat samples, Mat results, int flags)
 Predicts response(s) for the provided sample(s) More...
 
virtual float predict (Mat samples, Mat results)
 Predicts response(s) for the provided sample(s) More...
 
virtual float predict (Mat samples)
 Predicts response(s) for the provided sample(s) More...
 
- Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
IntPtr getNativeObjAddr ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
void save (string filename)
 
virtual string getDefaultName ()
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new SVM __fromPtr__ (IntPtr addr)
 
static ParamGrid getDefaultGridPtr (int param_id)
 Generates a grid for SVM parameters. More...
 
static SVM create ()
 
static SVM load (string filepath)
 Loads and creates a serialized svm from a file. More...
 
- Static Public Member Functions inherited from OpenCVForUnity.MlModule.StatModel
static new StatModel __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
static Algorithm __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Public Attributes

const int CUSTOM = -1
 
const int LINEAR = 0
 
const int POLY = 1
 
const int RBF = 2
 
const int SIGMOID = 3
 
const int CHI2 = 4
 
const int INTER = 5
 
const int C = 0
 
const int GAMMA = 1
 
const int P = 2
 
const int NU = 3
 
const int COEF = 4
 
const int DEGREE = 5
 
const int C_SVC = 100
 
const int NU_SVC = 101
 
const int ONE_CLASS = 102
 
const int EPS_SVR = 103
 
const int NU_SVR = 104
 
- Public Attributes inherited from OpenCVForUnity.MlModule.StatModel
const int UPDATE_MODEL = 1
 
const int RAW_OUTPUT = 1
 
const int COMPRESSED_INPUT = 2
 
const int PREPROCESSED_INPUT = 4
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Support Vector Machines.

See also
ml_intro_svm

Member Function Documentation

◆ __fromPtr__()

static new SVM OpenCVForUnity.MlModule.SVM.__fromPtr__ ( IntPtr  addr)
static

◆ create()

static SVM OpenCVForUnity.MlModule.SVM.create ( )
static

Creates empty model. Use StatModel::train to train the model. Since SVM has several parameters, you may want to find the best parameters for your problem, it can be done with SVM::trainAuto.

◆ Dispose()

override void OpenCVForUnity.MlModule.SVM.Dispose ( bool  disposing)
protectedvirtual

Reimplemented from OpenCVForUnity.MlModule.StatModel.

◆ getC()

double OpenCVForUnity.MlModule.SVM.getC ( )
See also
setC

◆ getClassWeights()

Mat OpenCVForUnity.MlModule.SVM.getClassWeights ( )
See also
setClassWeights

◆ getCoef0()

double OpenCVForUnity.MlModule.SVM.getCoef0 ( )
See also
setCoef0

◆ getDecisionFunction()

double OpenCVForUnity.MlModule.SVM.getDecisionFunction ( int  i,
Mat  alpha,
Mat  svidx 
)

Retrieves the decision function.

Parameters
ithe index of the decision function. If the problem solved is regression, 1-class or 2-class classification, then there will be just one decision function and the index should always be 0. Otherwise, in the case of N-class classification, there will be \(N(N-1)/2\) decision functions.
alphathe optional output vector for weights, corresponding to different support vectors. In the case of linear SVM all the alpha's will be 1's.
svidxthe optional output vector of indices of support vectors within the matrix of support vectors (which can be retrieved by SVM::getSupportVectors). In the case of linear SVM each decision function consists of a single "compressed" support vector.

The method returns rho parameter of the decision function, a scalar subtracted from the weighted sum of kernel responses.

◆ getDefaultGridPtr()

static ParamGrid OpenCVForUnity.MlModule.SVM.getDefaultGridPtr ( int  param_id)
static

Generates a grid for SVM parameters.

Parameters
param_idSVM parameters IDs that must be one of the SVM::ParamTypes. The grid is generated for the parameter with this ID.

The function generates a grid pointer for the specified parameter of the SVM algorithm. The grid may be passed to the function SVM::trainAuto.

◆ getDegree()

double OpenCVForUnity.MlModule.SVM.getDegree ( )
See also
setDegree

◆ getGamma()

double OpenCVForUnity.MlModule.SVM.getGamma ( )
See also
setGamma

◆ getKernelType()

int OpenCVForUnity.MlModule.SVM.getKernelType ( )

Type of a SVM kernel. See SVM::KernelTypes. Default value is SVM::RBF.

◆ getNu()

double OpenCVForUnity.MlModule.SVM.getNu ( )
See also
setNu

◆ getP()

double OpenCVForUnity.MlModule.SVM.getP ( )
See also
setP

◆ getSupportVectors()

Mat OpenCVForUnity.MlModule.SVM.getSupportVectors ( )

Retrieves all the support vectors.

The method returns all the support vectors as a floating-point matrix, where support vectors are stored as matrix rows.

◆ getTermCriteria()

TermCriteria OpenCVForUnity.MlModule.SVM.getTermCriteria ( )
See also
setTermCriteria

◆ getType()

int OpenCVForUnity.MlModule.SVM.getType ( )
See also
setType

◆ getUncompressedSupportVectors()

Mat OpenCVForUnity.MlModule.SVM.getUncompressedSupportVectors ( )

Retrieves all the uncompressed support vectors of a linear SVM.

The method returns all the uncompressed support vectors of a linear SVM that the compressed support vector, used for prediction, was derived from. They are returned in a floating-point matrix, where the support vectors are stored as matrix rows.

◆ load()

static SVM OpenCVForUnity.MlModule.SVM.load ( string  filepath)
static

Loads and creates a serialized svm from a file.

Use SVM::save to serialize and store an SVM to disk. Load the SVM from this file again, by calling this function with the path to the file.

Parameters
filepathpath to serialized svm

◆ setC()

void OpenCVForUnity.MlModule.SVM.setC ( double  val)
See also
getC

◆ setClassWeights()

void OpenCVForUnity.MlModule.SVM.setClassWeights ( Mat  val)
See also
getClassWeights

◆ setCoef0()

void OpenCVForUnity.MlModule.SVM.setCoef0 ( double  val)
See also
getCoef0

◆ setDegree()

void OpenCVForUnity.MlModule.SVM.setDegree ( double  val)
See also
getDegree

◆ setGamma()

void OpenCVForUnity.MlModule.SVM.setGamma ( double  val)
See also
getGamma

◆ setKernel()

void OpenCVForUnity.MlModule.SVM.setKernel ( int  kernelType)

Initialize with one of predefined kernels. See SVM::KernelTypes.

◆ setNu()

void OpenCVForUnity.MlModule.SVM.setNu ( double  val)
See also
getNu

◆ setP()

void OpenCVForUnity.MlModule.SVM.setP ( double  val)
See also
getP

◆ setTermCriteria()

void OpenCVForUnity.MlModule.SVM.setTermCriteria ( TermCriteria  val)
See also
getTermCriteria

◆ setType()

void OpenCVForUnity.MlModule.SVM.setType ( int  val)
See also
getType

◆ trainAuto() [1/9]

bool OpenCVForUnity.MlModule.SVM.trainAuto ( Mat  samples,
int  layout,
Mat  responses,
int  kFold,
ParamGrid  Cgrid,
ParamGrid  gammaGrid,
ParamGrid  pGrid,
ParamGrid  nuGrid,
ParamGrid  coeffGrid,
ParamGrid  degreeGrid,
bool  balanced 
)

Trains an SVM with optimal parameters.

Parameters
samplestraining samples
layoutSee ml::SampleTypes.
responsesvector of responses associated with the training samples.
kFoldCross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is
Cgridgrid for C
gammaGridgrid for gamma
pGridgrid for p
nuGridgrid for nu
coeffGridgrid for coeff
degreeGridgrid for degree
balancedIf true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.

The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.

This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only offers rudimentary parameter options.

This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and the usual SVM with parameters specified in params is executed.

◆ trainAuto() [2/9]

bool OpenCVForUnity.MlModule.SVM.trainAuto ( Mat  samples,
int  layout,
Mat  responses,
int  kFold,
ParamGrid  Cgrid,
ParamGrid  gammaGrid,
ParamGrid  pGrid,
ParamGrid  nuGrid,
ParamGrid  coeffGrid,
ParamGrid  degreeGrid 
)

Trains an SVM with optimal parameters.

Parameters
samplestraining samples
layoutSee ml::SampleTypes.
responsesvector of responses associated with the training samples.
kFoldCross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is
Cgridgrid for C
gammaGridgrid for gamma
pGridgrid for p
nuGridgrid for nu
coeffGridgrid for coeff
degreeGridgrid for degree
balancedIf true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.

The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.

This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only offers rudimentary parameter options.

This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and the usual SVM with parameters specified in params is executed.

◆ trainAuto() [3/9]

bool OpenCVForUnity.MlModule.SVM.trainAuto ( Mat  samples,
int  layout,
Mat  responses,
int  kFold,
ParamGrid  Cgrid,
ParamGrid  gammaGrid,
ParamGrid  pGrid,
ParamGrid  nuGrid,
ParamGrid  coeffGrid 
)

Trains an SVM with optimal parameters.

Parameters
samplestraining samples
layoutSee ml::SampleTypes.
responsesvector of responses associated with the training samples.
kFoldCross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is
Cgridgrid for C
gammaGridgrid for gamma
pGridgrid for p
nuGridgrid for nu
coeffGridgrid for coeff
degreeGridgrid for degree
balancedIf true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.

The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.

This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only offers rudimentary parameter options.

This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and the usual SVM with parameters specified in params is executed.

◆ trainAuto() [4/9]

bool OpenCVForUnity.MlModule.SVM.trainAuto ( Mat  samples,
int  layout,
Mat  responses,
int  kFold,
ParamGrid  Cgrid,
ParamGrid  gammaGrid,
ParamGrid  pGrid,
ParamGrid  nuGrid 
)

Trains an SVM with optimal parameters.

Parameters
samplestraining samples
layoutSee ml::SampleTypes.
responsesvector of responses associated with the training samples.
kFoldCross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is
Cgridgrid for C
gammaGridgrid for gamma
pGridgrid for p
nuGridgrid for nu
coeffGridgrid for coeff
degreeGridgrid for degree
balancedIf true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.

The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.

This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only offers rudimentary parameter options.

This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and the usual SVM with parameters specified in params is executed.

◆ trainAuto() [5/9]

bool OpenCVForUnity.MlModule.SVM.trainAuto ( Mat  samples,
int  layout,
Mat  responses,
int  kFold,
ParamGrid  Cgrid,
ParamGrid  gammaGrid,
ParamGrid  pGrid 
)

Trains an SVM with optimal parameters.

Parameters
samplestraining samples
layoutSee ml::SampleTypes.
responsesvector of responses associated with the training samples.
kFoldCross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is
Cgridgrid for C
gammaGridgrid for gamma
pGridgrid for p
nuGridgrid for nu
coeffGridgrid for coeff
degreeGridgrid for degree
balancedIf true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.

The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.

This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only offers rudimentary parameter options.

This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and the usual SVM with parameters specified in params is executed.

◆ trainAuto() [6/9]

bool OpenCVForUnity.MlModule.SVM.trainAuto ( Mat  samples,
int  layout,
Mat  responses,
int  kFold,
ParamGrid  Cgrid,
ParamGrid  gammaGrid 
)

Trains an SVM with optimal parameters.

Parameters
samplestraining samples
layoutSee ml::SampleTypes.
responsesvector of responses associated with the training samples.
kFoldCross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is
Cgridgrid for C
gammaGridgrid for gamma
pGridgrid for p
nuGridgrid for nu
coeffGridgrid for coeff
degreeGridgrid for degree
balancedIf true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.

The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.

This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only offers rudimentary parameter options.

This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and the usual SVM with parameters specified in params is executed.

◆ trainAuto() [7/9]

bool OpenCVForUnity.MlModule.SVM.trainAuto ( Mat  samples,
int  layout,
Mat  responses,
int  kFold,
ParamGrid  Cgrid 
)

Trains an SVM with optimal parameters.

Parameters
samplestraining samples
layoutSee ml::SampleTypes.
responsesvector of responses associated with the training samples.
kFoldCross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is
Cgridgrid for C
gammaGridgrid for gamma
pGridgrid for p
nuGridgrid for nu
coeffGridgrid for coeff
degreeGridgrid for degree
balancedIf true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.

The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.

This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only offers rudimentary parameter options.

This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and the usual SVM with parameters specified in params is executed.

◆ trainAuto() [8/9]

bool OpenCVForUnity.MlModule.SVM.trainAuto ( Mat  samples,
int  layout,
Mat  responses,
int  kFold 
)

Trains an SVM with optimal parameters.

Parameters
samplestraining samples
layoutSee ml::SampleTypes.
responsesvector of responses associated with the training samples.
kFoldCross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is
Cgridgrid for C
gammaGridgrid for gamma
pGridgrid for p
nuGridgrid for nu
coeffGridgrid for coeff
degreeGridgrid for degree
balancedIf true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.

The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.

This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only offers rudimentary parameter options.

This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and the usual SVM with parameters specified in params is executed.

◆ trainAuto() [9/9]

bool OpenCVForUnity.MlModule.SVM.trainAuto ( Mat  samples,
int  layout,
Mat  responses 
)

Trains an SVM with optimal parameters.

Parameters
samplestraining samples
layoutSee ml::SampleTypes.
responsesvector of responses associated with the training samples.
kFoldCross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is
Cgridgrid for C
gammaGridgrid for gamma
pGridgrid for p
nuGridgrid for nu
coeffGridgrid for coeff
degreeGridgrid for degree
balancedIf true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.

The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.

This function only makes use of SVM::getDefaultGrid for parameter optimization and thus only offers rudimentary parameter options.

This function works for the classification (SVM::C_SVC or SVM::NU_SVC) as well as for the regression (SVM::EPS_SVR or SVM::NU_SVR). If it is SVM::ONE_CLASS, no optimization is made and the usual SVM with parameters specified in params is executed.

Member Data Documentation

◆ C

const int OpenCVForUnity.MlModule.SVM.C = 0

◆ C_SVC

const int OpenCVForUnity.MlModule.SVM.C_SVC = 100

◆ CHI2

const int OpenCVForUnity.MlModule.SVM.CHI2 = 4

◆ COEF

const int OpenCVForUnity.MlModule.SVM.COEF = 4

◆ CUSTOM

const int OpenCVForUnity.MlModule.SVM.CUSTOM = -1

◆ DEGREE

const int OpenCVForUnity.MlModule.SVM.DEGREE = 5

◆ EPS_SVR

const int OpenCVForUnity.MlModule.SVM.EPS_SVR = 103

◆ GAMMA

const int OpenCVForUnity.MlModule.SVM.GAMMA = 1

◆ INTER

const int OpenCVForUnity.MlModule.SVM.INTER = 5

◆ LINEAR

const int OpenCVForUnity.MlModule.SVM.LINEAR = 0

◆ NU

const int OpenCVForUnity.MlModule.SVM.NU = 3

◆ NU_SVC

const int OpenCVForUnity.MlModule.SVM.NU_SVC = 101

◆ NU_SVR

const int OpenCVForUnity.MlModule.SVM.NU_SVR = 104

◆ ONE_CLASS

const int OpenCVForUnity.MlModule.SVM.ONE_CLASS = 102

◆ P

const int OpenCVForUnity.MlModule.SVM.P = 2

◆ POLY

const int OpenCVForUnity.MlModule.SVM.POLY = 1

◆ RBF

const int OpenCVForUnity.MlModule.SVM.RBF = 2

◆ SIGMOID

const int OpenCVForUnity.MlModule.SVM.SIGMOID = 3

The documentation for this class was generated from the following file: