Emgu CV Library Documentation
TrainAuto Method (trainData, responses, varIdx, sampleIdx, parameters, kFold, cGrid, gammaGrid, pGrid, nuGrid, coefGrid, degreeGrid)
NamespacesEmgu.CV.MLSVMTrainAuto(Matrix<(Of <(Single>)>), Matrix<(Of <(Single>)>), Matrix<(Of <(Int32>)>), Matrix<(Of <(Int32>)>), MCvSVMParams, Int32, MCvParamGrid, MCvParamGrid, MCvParamGrid, MCvParamGrid, MCvParamGrid, MCvParamGrid)

www.emgu.com/wiki
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.
Declaration Syntax
C#Visual BasicVisual C++
public bool TrainAuto(
	Matrix<float> trainData,
	Matrix<float> responses,
	Matrix<int> varIdx,
	Matrix<int> sampleIdx,
	MCvSVMParams parameters,
	int kFold,
	MCvParamGrid cGrid,
	MCvParamGrid gammaGrid,
	MCvParamGrid pGrid,
	MCvParamGrid nuGrid,
	MCvParamGrid coefGrid,
	MCvParamGrid degreeGrid
)
Public Function TrainAuto ( _
	trainData As Matrix(Of Single), _
	responses As Matrix(Of Single), _
	varIdx As Matrix(Of Integer), _
	sampleIdx As Matrix(Of Integer), _
	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
public:
bool TrainAuto(
	Matrix<float>^ trainData, 
	Matrix<float>^ responses, 
	Matrix<int>^ varIdx, 
	Matrix<int>^ sampleIdx, 
	MCvSVMParams parameters, 
	int kFold, 
	MCvParamGrid cGrid, 
	MCvParamGrid gammaGrid, 
	MCvParamGrid pGrid, 
	MCvParamGrid nuGrid, 
	MCvParamGrid coefGrid, 
	MCvParamGrid degreeGrid
)
Parameters
trainData (Matrix<(Of <(Single>)>))
The training data.
responses (Matrix<(Of <(Single>)>))
The response for the training data.
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
cGrid (MCvParamGrid)
cGrid
gammaGrid (MCvParamGrid)
gammaGrid
pGrid (MCvParamGrid)
pGrid
nuGrid (MCvParamGrid)
nuGrid
coefGrid (MCvParamGrid)
coedGrid
degreeGrid (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.Int32},Emgu.CV.Matrix{System.Int32},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)]

Assembly: Emgu.CV.ML (Module: Emgu.CV.ML) Version: 1.0.0.0 (1.0.0.0)