http://www.emgu.com
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.ML
Assembly: Emgu.CV.ML (in Emgu.CV.ML.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public static bool CvSVMTrainAuto(
	IntPtr model,
	IntPtr trainData,
	IntPtr responses,
	IntPtr varIdx,
	IntPtr sampleIdx,
	ref MCvSVMParams parameters,
	int kFold,
	ref MCvParamGrid cGrid,
	ref MCvParamGrid gammaGrid,
	ref MCvParamGrid pGrid,
	ref MCvParamGrid nuGrid,
	ref MCvParamGrid coefGrid,
	ref MCvParamGrid degreeGrid
)
Visual Basic
Public Shared Function CvSVMTrainAuto ( 
	model As IntPtr,
	trainData As IntPtr,
	responses As IntPtr,
	varIdx As IntPtr,
	sampleIdx As IntPtr,
	ByRef parameters As MCvSVMParams,
	kFold As Integer,
	ByRef cGrid As MCvParamGrid,
	ByRef gammaGrid As MCvParamGrid,
	ByRef pGrid As MCvParamGrid,
	ByRef nuGrid As MCvParamGrid,
	ByRef coefGrid As MCvParamGrid,
	ByRef degreeGrid As MCvParamGrid
) As Boolean
Visual C++
public:
static bool CvSVMTrainAuto(
	IntPtr model, 
	IntPtr trainData, 
	IntPtr responses, 
	IntPtr varIdx, 
	IntPtr sampleIdx, 
	MCvSVMParams% parameters, 
	int kFold, 
	MCvParamGrid% cGrid, 
	MCvParamGrid% gammaGrid, 
	MCvParamGrid% pGrid, 
	MCvParamGrid% nuGrid, 
	MCvParamGrid% coefGrid, 
	MCvParamGrid% degreeGrid
)
F#
static member CvSVMTrainAuto : 
        model : IntPtr * 
        trainData : IntPtr * 
        responses : IntPtr * 
        varIdx : IntPtr * 
        sampleIdx : IntPtr * 
        parameters : MCvSVMParams byref * 
        kFold : int * 
        cGrid : MCvParamGrid byref * 
        gammaGrid : MCvParamGrid byref * 
        pGrid : MCvParamGrid byref * 
        nuGrid : MCvParamGrid byref * 
        coefGrid : MCvParamGrid byref * 
        degreeGrid : MCvParamGrid byref -> bool 

Parameters

model
Type: System..::..IntPtr
The SVM model
trainData
Type: System..::..IntPtr
The training data.
responses
Type: System..::..IntPtr
The response for the training data.
varIdx
Type: System..::..IntPtr
Can be null if not needed. When specified, identifies variables (features) of interest. It is a Matrix>int< of nx1
sampleIdx
Type: System..::..IntPtr
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

Type: Boolean

[Missing <returns> documentation for "M:Emgu.CV.ML.MlInvoke.CvSVMTrainAuto(System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,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@)"]

See Also