http://www.emgu.com
Assembly: Emgu.CV.ML (in Emgu.CV.ML.dll) Version: 2.3.0.1416 (2.3.0.1416)
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.
Namespace: Emgu.CV.MLAssembly: Emgu.CV.ML (in Emgu.CV.ML.dll) Version: 2.3.0.1416 (2.3.0.1416)
Syntax
C# |
---|
public bool TrainAuto( Matrix<float> trainData, Matrix<float> responses, Matrix<byte> varIdx, Matrix<byte> sampleIdx, MCvSVMParams parameters, int kFold, MCvParamGrid cGrid, MCvParamGrid gammaGrid, MCvParamGrid pGrid, MCvParamGrid nuGrid, MCvParamGrid coefGrid, MCvParamGrid degreeGrid ) |
Visual Basic |
---|
Public Function TrainAuto ( _ trainData As Matrix(Of Single), _ responses As Matrix(Of Single), _ varIdx As Matrix(Of Byte), _ sampleIdx As Matrix(Of Byte), _ parameters As MCvSVMParams, _ kFold As Integer, _ cGrid As MCvParamGrid, _ gammaGrid As MCvParamGrid, _ pGrid As MCvParamGrid, _ nuGrid As MCvParamGrid, _ coefGrid As MCvParamGrid, _ degreeGrid As MCvParamGrid _ ) As Boolean |
Visual C++ |
---|
public: bool TrainAuto( Matrix<float>^ trainData, Matrix<float>^ responses, Matrix<unsigned char>^ varIdx, Matrix<unsigned char>^ sampleIdx, MCvSVMParams parameters, int kFold, MCvParamGrid cGrid, MCvParamGrid gammaGrid, MCvParamGrid pGrid, MCvParamGrid nuGrid, MCvParamGrid coefGrid, MCvParamGrid degreeGrid ) |
Parameters
- trainData
- Type: Emgu.CV..::..Matrix<(Of <(<'Single>)>)>
The training data.
- responses
- Type: Emgu.CV..::..Matrix<(Of <(<'Single>)>)>
The response for the training data.
- varIdx
- Type: Emgu.CV..::..Matrix<(Of <(<'Byte>)>)>
Can be null if not needed. When specified, identifies variables (features) of interest. It is a Matrix<int> of nx1
- sampleIdx
- Type: Emgu.CV..::..Matrix<(Of <(<'Byte>)>)>
Can be null if not needed. When specified, identifies samples of interest. It is a Matrix<int> of nx1
- parameters
- Type: Emgu.CV.ML.Structure..::..MCvSVMParams
The parameters for SVM
- kFold
- Type: System..::..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
- cGrid
- Type: Emgu.CV.ML.Structure..::..MCvParamGrid
cGrid
- gammaGrid
- Type: Emgu.CV.ML.Structure..::..MCvParamGrid
gammaGrid
- pGrid
- Type: Emgu.CV.ML.Structure..::..MCvParamGrid
pGrid
- nuGrid
- Type: Emgu.CV.ML.Structure..::..MCvParamGrid
nuGrid
- coefGrid
- Type: Emgu.CV.ML.Structure..::..MCvParamGrid
coedGrid
- degreeGrid
- Type: Emgu.CV.ML.Structure..::..MCvParamGrid
degreeGrid
Return Value
[Missing <returns> documentation for "M:Emgu.CV.ML.SVM.TrainAuto(Emgu.CV.Matrix{System.Single},Emgu.CV.Matrix{System.Single},Emgu.CV.Matrix{System.Byte},Emgu.CV.Matrix{System.Byte},Emgu.CV.ML.Structure.MCvSVMParams,System.Int32,Emgu.CV.ML.Structure.MCvParamGrid,Emgu.CV.ML.Structure.MCvParamGrid,Emgu.CV.ML.Structure.MCvParamGrid,Emgu.CV.ML.Structure.MCvParamGrid,Emgu.CV.ML.Structure.MCvParamGrid,Emgu.CV.ML.Structure.MCvParamGrid)"]