The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree from CvSVMParams. By the optimality one mean that the cross-validation estimate of the test set error is minimal.
| C# | Visual Basic | Visual C++ |
public bool TrainAuto( Matrix<float> trainData, Matrix<float> responses, Matrix<int> varIdx, Matrix<int> sampleIdx, MCvSVMParams parameters, int kFold )
- varIdx (Matrix<(Of <(Int32>)>))
- Can be null if not needed. When specified, identifies variables (features) of interest. It is a Matrix<int> of nx1
- sampleIdx (Matrix<(Of <(Int32>)>))
- Can be null if not needed. When specified, identifies samples of interest. It is a Matrix<int> of nx1
- parameters (MCvSVMParams)
- The parameters for SVM
- kFold (Int32)
- Cross-validation parameter. The training set is divided into k_fold subsets, one subset being used to train the model, the others forming the test set. So, the SVM algorithm is executed k_fold times
[Missing <returns> documentation for M:Emgu.CV.ML.SVM.TrainAuto(Emgu.CV.Matrix{System.Single},Emgu.CV.Matrix{System.Single},Emgu.CV.Matrix{System.Int32},Emgu.CV.Matrix{System.Int32},Emgu.CV.ML.Structure.MCvSVMParams,System.Int32)]