Class SVMSGD
- Namespace
- OpenCvSharp.ML
- Assembly
- OpenCvSharp.dll
Stochastic Gradient Descent SVM classifier
public class SVMSGD : StatModel, IDisposable
- Inheritance
-
SVMSGD
- Implements
- Inherited Members
Properties
- InitialStepSize
Parameter initialStepSize of a %SVMSGD optimization problem.
- MarginRegularization
Parameter marginRegularization of a %SVMSGD optimization problem.
- MarginType
Margin type, one of SVMSGD::MarginType.
- StepDecreasingPower
Parameter stepDecreasingPower of a %SVMSGD optimization problem.
- SvmsgdType
Algorithm type, one of SVMSGD::SvmsgdType.
- TermCriteria
Termination criteria of the training algorithm. You can specify the maximum number of iterations (maxCount) and/or how much the error could change between the iterations to make the algorithm continue (epsilon).
Methods
- Create()
Creates empty model. Use StatModel::Train to train the model. Since %SVMSGD has several parameters, you may want to find the best parameters for your problem or use SetOptimalParameters to set some default parameters.
- GetShift()
Returns the shift of the trained model (decision function f(x) = weights * x + shift).
- GetWeights()
Returns the weights of the trained model (decision function f(x) = weights * x + shift).
- Load(string)
Loads and creates a serialized SVMSGD from a file. Use SVMSGD::save to serialize and store an SVMSGD to disk. Load the SVMSGD from this file again, by calling this function with the path to the file.
- LoadFromString(string)
Loads algorithm from a String.
- SetOptimalParameters(SvmsgdTypes, MarginTypes)
Function sets optimal parameters values for chosen SVM SGD model.