svmpath               package:svmpath               R Documentation

_F_i_t _t_h_e _e_n_t_i_r_e _r_e_g_u_l_a_r_i_z_a_t_i_o_n _p_a_t_h _f_o_r _a _2-_c_l_a_s_s _S_V_M

_D_e_s_c_r_i_p_t_i_o_n:

     The SVM has a regularization or cost parameter C, which controls
     the amount by which points overlap their soft margins. Typically
     either a default large value for C is chosen (allowing minimal
     overlap), or else a few values are compared using a valication
     set. This algorithm computes the entire regularization path (i.e.
     for all possible values of C for which the solution changes), with
     a cost a small (~3)  multiple of the cost of fitting a single
     model.

_U_s_a_g_e:

     svmpath(x, y, K, kernel.function = poly.kernel, param.kernel = 1, trace, plot.it, linear.plot, eps = 1e-10, Nmoves = 3 * n, digits = 6, lambda.min = 1e-04, ...)

_A_r_g_u_m_e_n_t_s:

       x: the data matrix (n x p) with n rows (observations) on p
          variables (columns)

       y: The {-1,+1} valued response variable.

       K: a n x n kernel matrix, with default value 'K=
          kernel.function(x, x)'

kernel.function: This is a user-defined function. Provided are
          'poly.kernel' (the default, with parameter set to default to
          a linear kernel) and 'radial.kernel'

param.kernel: parameter(s) of the kernels

   trace: if 'TRUE', a progress report is printed as the algorithm
          runs; default is 'FALSE'

 plot.it: a flag indicating whether a plot should be produced (default
          'FALSE'; only usable with 'p=2'

linear.plot: if 'TRUE', the plotting routine exploits the knowledge
          that the solution is linear; otherwise a contour algorithm is
          used. The default is 'missing(kernel)' (i.e. 'TRUE' if a
          default linear kernel is used

     eps: a small machine number which is used to identify minimal step
          sizes

  Nmoves: the maximum number of moves

  digits: the number of digits in the printout

lambda.min: The smallest value of 'lambda = 1/C'; default is
          'lambda=10e-4', or 'C=10000'

     ...: additional arguments to some of the functions called by
          svmpath

_D_e_t_a_i_l_s:

     The algorithm used in 'svmpath()' is described in detail in "The
     Entire Regularization Path for the Support Vector Machine" by
     Hastie, Rosset, Tibshirani and Zhu (2004). It exploits the fact
     that the "hinge" loss-function is piecewise linear, and the
     penalty term is quadratic. This means that in the dual space, the
     lagrange multipliers will be pieceise linear (c.f. 'lars').

_V_a_l_u_e:

     a "svmpath" object is returned, for which there are print,
     summary, coef and predict methods.

_W_a_r_n_i_n_g:

     Currently the algorithm can get into machine errors if 'epsilon'
     is too small, or if 'lambda.min' is too small. Increasing either
     from their defaults should make the problems go away, by
     terminating the algorithm slightly early.

_N_o_t_e:

     This implementation of the algorithm does not use updating to
     solve the "elbow" linear equations. This is possible, since the
     elbow changes by a small number of points at a time. Future
     version of the software will do this. The author has encountered
     numerical problems with early attempts at this.

_A_u_t_h_o_r(_s):

     Trevor Hastie

_R_e_f_e_r_e_n_c_e_s:

     The paper <URL:
     http://www-stat.stanford.edu/~hastie/Papers/svmpath.pdf>, as well
     as the talk <URL:
     http://www-stat.stanford.edu/~hastie/TALKS/svmpathtalk.pdf>.

_S_e_e _A_l_s_o:

     print, coef, summary, predict, and FilmPath

_E_x_a_m_p_l_e_s:

     data(svmpath)
     attach(unbalanced.separated)
     svmpath(x,y,trace=TRUE,plot=TRUE)
     detach(2)
     ## Not run: svmpath(x,y,kernel=radial.kernel,param.kernel=.8)

