SVMTrainAuto Method (TrainData, Int32, MCvParamGrid, MCvParamGrid, MCvParamGrid, MCvParamGrid, MCvParamGrid, MCvParamGrid, Boolean) |
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.MLAssembly: Emgu.CV.ML (in Emgu.CV.ML.dll) Version: 3.0.0.2161 (3.0.0.2161)
Syntaxpublic bool TrainAuto(
TrainData trainData,
int kFold,
MCvParamGrid cGrid,
MCvParamGrid gammaGrid,
MCvParamGrid pGrid,
MCvParamGrid nuGrid,
MCvParamGrid coefGrid,
MCvParamGrid degreeGrid,
bool balanced = false
)
Public Function TrainAuto (
trainData As TrainData,
kFold As Integer,
cGrid As MCvParamGrid,
gammaGrid As MCvParamGrid,
pGrid As MCvParamGrid,
nuGrid As MCvParamGrid,
coefGrid As MCvParamGrid,
degreeGrid As MCvParamGrid,
Optional balanced As Boolean = false
) As Boolean
public:
bool TrainAuto(
TrainData^ trainData,
int kFold,
MCvParamGrid cGrid,
MCvParamGrid gammaGrid,
MCvParamGrid pGrid,
MCvParamGrid nuGrid,
MCvParamGrid coefGrid,
MCvParamGrid degreeGrid,
bool balanced = false
)
member TrainAuto :
trainData : TrainData *
kFold : int *
cGrid : MCvParamGrid *
gammaGrid : MCvParamGrid *
pGrid : MCvParamGrid *
nuGrid : MCvParamGrid *
coefGrid : MCvParamGrid *
degreeGrid : MCvParamGrid *
?balanced : bool
(* Defaults:
let _balanced = defaultArg balanced false
*)
-> bool
Parameters
- trainData
- Type: Emgu.CV.MLTrainData
The training data. - kFold
- Type: SystemInt32
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.StructureMCvParamGrid
cGrid - gammaGrid
- Type: Emgu.CV.ML.StructureMCvParamGrid
grid for gamma - pGrid
- Type: Emgu.CV.ML.StructureMCvParamGrid
grid for p - nuGrid
- Type: Emgu.CV.ML.StructureMCvParamGrid
grid for nu - coefGrid
- Type: Emgu.CV.ML.StructureMCvParamGrid
grid for coeff - degreeGrid
- Type: Emgu.CV.ML.StructureMCvParamGrid
grid for degree - balanced (Optional)
- Type: SystemBoolean
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.
Return Value
Type:
Boolean[Missing <returns> documentation for "M:Emgu.CV.ML.SVM.TrainAuto(Emgu.CV.ML.TrainData,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,System.Boolean)"]
See Also