cv.SVMSGD - MATLAB File Help Go to online doc for cv.SVMSGD
cv.SVMSGD

Stochastic Gradient Descent SVM classifier

SVMSGD provides a fast and easy-to-use implementation of the SVM classifier using the Stochastic Gradient Descent approach, as presented in [bottou2010large].

The classifier has following parameters:

The model type may have one of the following values: 'SGD' and 'ASGD'.

The recommended model type is ASGD (following [bottou2010large]).

The margin type may have one of the following values:

In the general case (if you know nothing about linear separability of your sets), use 'SoftMargin'.

The other parameters may be described as follows:

Note that the parameters margin regularization, initial step size, and step decreasing power should be positive.

To use SVMSGD algorithm do as follows:

Example:

% Create empty object
svmsgd = cv.SVMSGD();
% Train the Stochastic Gradient Descent SVM
svmsgd.train(trainData);
% Predict labels for the new samples
svmsgd.predict(samples, responses);

References

[bottou2010large]:

Leon Bottou. "Large-scale machine learning with stochastic gradient descent". In Proceedings of COMPSTAT 2010, pages 177-186. Springer.

See also
Class Details
Superclasses handle
Sealed false
Construct on load false
Constructor Summary
SVMSGD Creates empty model 
Property Summary
InitialStepSize Parameter initial step size of a SVMSGD optimization problem. 
MarginRegularization Parameter margin regularization of a SVMSGD optimization problem. 
MarginType Margin type. 
StepDecreasingPower Parameter step decreasing power of a SVMSGD optimization problem. 
SvmsgdType Algorithm type. 
TermCriteria Termination criteria of the training algorithm. 
id Object ID 
Method Summary
  addlistener Add listener for event. 
  calcError Computes error on the training or test dataset 
  clear Clears the algorithm state 
  delete Destructor 
  empty Returns true if the algorithm is empty 
  eq == (EQ) Test handle equality. 
  findobj Find objects matching specified conditions. 
  findprop Find property of MATLAB handle object. 
  ge >= (GE) Greater than or equal relation for handles. 
  getDefaultName Returns the algorithm string identifier 
  getShift Get model shift 
  getVarCount Returns the number of variables in training samples 
  getWeights Get model weights 
  gt > (GT) Greater than relation for handles. 
  isClassifier Returns true if the model is a classifier 
  isTrained Returns true if the model is trained 
Sealed   isvalid Test handle validity. 
  le <= (LE) Less than or equal relation for handles. 
  listener Add listener for event without binding the listener to the source object. 
  load Loads algorithm from a file or a string 
  lt < (LT) Less than relation for handles. 
  ne ~= (NE) Not equal relation for handles. 
  notify Notify listeners of event. 
  predict Predicts response(s) for the provided sample(s) 
  save Saves the algorithm parameters to a file or a string 
  setOptimalParameters Function sets optimal parameters values for chosen SVM SGD model 
  train Trains the statistical model 
Event Summary
ObjectBeingDestroyed Notifies listeners that a particular object has been destroyed.