|
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...
|
|
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...
|
|
IntPtr | getNativeObjAddr () |
|
virtual void | clear () |
| Clears the algorithm state. More...
|
|
void | save (string filename) |
|
virtual string | getDefaultName () |
|
void | Dispose () |
|
void | ThrowIfDisposed () |
|
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
-
samples | training samples |
layout | See ml::SampleTypes. |
responses | vector of responses associated with the training samples. |
kFold | Cross-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 |
Cgrid | grid for C |
gammaGrid | grid for gamma |
pGrid | grid for p |
nuGrid | grid for nu |
coeffGrid | grid for coeff |
degreeGrid | grid for degree |
balanced | If 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.
Trains an SVM with optimal parameters.
- Parameters
-
samples | training samples |
layout | See ml::SampleTypes. |
responses | vector of responses associated with the training samples. |
kFold | Cross-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 |
Cgrid | grid for C |
gammaGrid | grid for gamma |
pGrid | grid for p |
nuGrid | grid for nu |
coeffGrid | grid for coeff |
degreeGrid | grid for degree |
balanced | If 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.
Trains an SVM with optimal parameters.
- Parameters
-
samples | training samples |
layout | See ml::SampleTypes. |
responses | vector of responses associated with the training samples. |
kFold | Cross-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 |
Cgrid | grid for C |
gammaGrid | grid for gamma |
pGrid | grid for p |
nuGrid | grid for nu |
coeffGrid | grid for coeff |
degreeGrid | grid for degree |
balanced | If 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.
Trains an SVM with optimal parameters.
- Parameters
-
samples | training samples |
layout | See ml::SampleTypes. |
responses | vector of responses associated with the training samples. |
kFold | Cross-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 |
Cgrid | grid for C |
gammaGrid | grid for gamma |
pGrid | grid for p |
nuGrid | grid for nu |
coeffGrid | grid for coeff |
degreeGrid | grid for degree |
balanced | If 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.
Trains an SVM with optimal parameters.
- Parameters
-
samples | training samples |
layout | See ml::SampleTypes. |
responses | vector of responses associated with the training samples. |
kFold | Cross-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 |
Cgrid | grid for C |
gammaGrid | grid for gamma |
pGrid | grid for p |
nuGrid | grid for nu |
coeffGrid | grid for coeff |
degreeGrid | grid for degree |
balanced | If 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.
bool OpenCVForUnity.MlModule.SVM.trainAuto |
( |
Mat |
samples, |
|
|
int |
layout, |
|
|
Mat |
responses, |
|
|
int |
kFold, |
|
|
ParamGrid |
Cgrid, |
|
|
ParamGrid |
gammaGrid |
|
) |
| |
Trains an SVM with optimal parameters.
- Parameters
-
samples | training samples |
layout | See ml::SampleTypes. |
responses | vector of responses associated with the training samples. |
kFold | Cross-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 |
Cgrid | grid for C |
gammaGrid | grid for gamma |
pGrid | grid for p |
nuGrid | grid for nu |
coeffGrid | grid for coeff |
degreeGrid | grid for degree |
balanced | If 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.
bool OpenCVForUnity.MlModule.SVM.trainAuto |
( |
Mat |
samples, |
|
|
int |
layout, |
|
|
Mat |
responses, |
|
|
int |
kFold, |
|
|
ParamGrid |
Cgrid |
|
) |
| |
Trains an SVM with optimal parameters.
- Parameters
-
samples | training samples |
layout | See ml::SampleTypes. |
responses | vector of responses associated with the training samples. |
kFold | Cross-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 |
Cgrid | grid for C |
gammaGrid | grid for gamma |
pGrid | grid for p |
nuGrid | grid for nu |
coeffGrid | grid for coeff |
degreeGrid | grid for degree |
balanced | If 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.
bool OpenCVForUnity.MlModule.SVM.trainAuto |
( |
Mat |
samples, |
|
|
int |
layout, |
|
|
Mat |
responses, |
|
|
int |
kFold |
|
) |
| |
Trains an SVM with optimal parameters.
- Parameters
-
samples | training samples |
layout | See ml::SampleTypes. |
responses | vector of responses associated with the training samples. |
kFold | Cross-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 |
Cgrid | grid for C |
gammaGrid | grid for gamma |
pGrid | grid for p |
nuGrid | grid for nu |
coeffGrid | grid for coeff |
degreeGrid | grid for degree |
balanced | If 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.
bool OpenCVForUnity.MlModule.SVM.trainAuto |
( |
Mat |
samples, |
|
|
int |
layout, |
|
|
Mat |
responses |
|
) |
| |
Trains an SVM with optimal parameters.
- Parameters
-
samples | training samples |
layout | See ml::SampleTypes. |
responses | vector of responses associated with the training samples. |
kFold | Cross-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 |
Cgrid | grid for C |
gammaGrid | grid for gamma |
pGrid | grid for p |
nuGrid | grid for nu |
coeffGrid | grid for coeff |
degreeGrid | grid for degree |
balanced | If 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.