SVM1D

Linear SVM for 1-dimensional input data.



 Synopsis:
  model = svm1d( data )
  model = svm1d( data, options )

 Description:
  model = svm1d( data ) trains the linear SVM binary
    classifier for the 1-dimensional training data.
    The optimizer is based on a modification of the 
    Sequential Minimal Optimizer (SMO) [Platt98]. 
    The trainined classfier is defined as
      q(x) = 1 if W*x + b >= 0
           = 2 if W*x + b < 0

  model = svm1d( data, options ) use to set up control
    parameters for the SVM and the SMO algorithm.

 Input:
  data [struct] Input 1-dimensional binary labeled training data:
   .X [1 x num_data] Training numbers.
   .y [1 x num_data] Labels (1 or 2).
  
  options [struct] Control parameters:
   .C [1x1] SVM regularization constant (default C=inf). 
   .eps [1x1] Tolerance of KKT-conditions (default eps=0.001).
   .tol [1x1] Minimal change of variables (default tol=0.001).

 Output:
  model [struct] Found SVM model:
   .Alpha [nsv x 1] Weights.
   .b [1x1] Bias of decision function.
   .sv.X [1 x nsv] Support vectors.
   .W [1x1] Explicit value of the normal vector (scalar).

   .nsv [1x1] Number of Support Vectors.
   .kercnt [1x1] Number of kernel evaluations (multiplications 
     in this 1-d linear case) used by the SMO.
   .trnerr [1x1] Training classification error.
   .margin [1x1] Margin of found classifier.
   .cputime [1x1] Used CPU time in seconds.
   .options [struct] Copy of used options.

 See also
  SMOSVMCLASSKFD, KFDQP.


Source: svm1d.m

About: Statistical Pattern Recognition Toolbox
(C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac
Czech Technical University Prague
Faculty of Electrical Engineering
Center for Machine Perception

Modifications:
17-may-2004, VF
14-may-2004, VF
15-july-2003, VF