Namespace: OpenCvSharp.CPlusPlus
Assembly: OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
public virtual bool TrainAuto( CvMat trainData, CvMat responses, CvMat varIdx, CvMat sampleIdx, CvSVMParams param, int kFold = 10, Nullable<CvParamGrid> cGrid = null, Nullable<CvParamGrid> gammaGrid = null, Nullable<CvParamGrid> pGrid = null, Nullable<CvParamGrid> nuGrid = null, Nullable<CvParamGrid> coefGrid = null, Nullable<CvParamGrid> degreeGrid = null, bool balanced = false )
Parameters
- trainData
- Type: OpenCvSharpCvMat
[Missing <param name="trainData"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- responses
- Type: OpenCvSharpCvMat
[Missing <param name="responses"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- varIdx
- Type: OpenCvSharpCvMat
[Missing <param name="varIdx"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- sampleIdx
- Type: OpenCvSharpCvMat
[Missing <param name="sampleIdx"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- param
- Type: OpenCvSharp.CPlusPlusCvSVMParams
[Missing <param name="param"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- kFold (Optional)
- 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 (Optional)
- Type: SystemNullableCvParamGrid
[Missing <param name="cGrid"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- gammaGrid (Optional)
- Type: SystemNullableCvParamGrid
[Missing <param name="gammaGrid"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- pGrid (Optional)
- Type: SystemNullableCvParamGrid
[Missing <param name="pGrid"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- nuGrid (Optional)
- Type: SystemNullableCvParamGrid
[Missing <param name="nuGrid"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- coefGrid (Optional)
- Type: SystemNullableCvParamGrid
[Missing <param name="coefGrid"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- degreeGrid (Optional)
- Type: SystemNullableCvParamGrid
[Missing <param name="degreeGrid"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
- balanced (Optional)
- Type: SystemBoolean
[Missing <param name="balanced"/> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]
Return Value
Type: Boolean[Missing <returns> documentation for "M:OpenCvSharp.CPlusPlus.CvSVM.TrainAuto(OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CvMat,OpenCvSharp.CPlusPlus.CvSVMParams,System.Int32,System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Nullable{OpenCvSharp.CPlusPlus.CvParamGrid},System.Boolean)"]