svmlight                package:klaR                R Documentation

_I_n_t_e_r_f_a_c_e _t_o _S_V_M_l_i_g_h_t

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

     Function to call SVMlight from R for classification. Multiple
     group classification is done with the one-against-rest partition
     of data.

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

     svmlight(x, ...)

     ## Default S3 method:
     svmlight(x, grouping, temp.dir = NULL, pathsvm = NULL, del = TRUE,
         type = "C", class.type = "oaa", svm.options = NULL, prior = NULL, 
         out = FALSE, ...)
     ## S3 method for class 'data.frame':
     svmlight(x, ...)
     ## S3 method for class 'matrix':
     svmlight(x, grouping, ..., subset, na.action = na.fail)
     ## S3 method for class 'formula':
     svmlight(formula, data = NULL, ..., subset, na.action = na.fail)

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

       x: matrix or data frame containing the explanatory variables 
          (required, if 'formula' is not given).

grouping: factor specifying the class for each observation  (required,
          if 'formula' is not given).

 formula: formula of the form 'groups ~ x1 + x2 + ...'.  That is, the
          response is the grouping factor and the right hand side
          specifies the (non-factor) discriminators.

    data: Data frame from which variables specified in 'formula' are
          preferentially to be taken.

temp.dir: directory for temporary files.

 pathsvm: Path to SVMlight binaries (required, if path os unknown by
          the OS).

     del: Logical: whether to delete temporary files

    type: Perform '"C"'=Classification or '"R"'=Regression

class.type: Multiclass scheme to use. See details.

svm.options: Optional parameters to SVMlight.

          For further details see: "How to use" on <URL:
          http://svmlight.joachims.org/>. 

   prior: A Priori probabilities of classes.

     out: Logical: whether SVMlight output ahouild be printed on
          console  (only for Windows OS.)

  subset: An index vector specifying the cases to be used in the
          training sample. (Note: If given, this argument must be
          named.)

na.action: specify the action to be taken if 'NA's are found. The
          default action is for the procedure to fail. An alternative
          is 'na.omit', which leads to rejection of cases with missing
          values on any required variable. (Note: If given, this
          argument must be named.) 

     ...: 

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

     Function to call SVMlight from R for classification ('type="C"'). 
     SVMlight is an implementation of Vapnik's Support Vector Machine.
     It is written in C by Thorsten Joachims. On the homepage (see
     below) the source-code and several binaries for SVMlight are
     available. If more then two classes are given the SVM is learned
     by the one-against-all scheme ('class.type="oaa"'). That means
     that each class is trained against the other K-1 classes. The
     class with the highest decision function in the SVM wins. So K
     SVMs have to be learned. If 'class.type="oao"' each class is
     tested against every other and the final class is elected by a
     majority vote.

     If 'type="R"' a SVM Regression is performed.

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

     A list containing the function call and the result of SVMlight.

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

     Karsten Luebke, luebke@statistik.uni-dortmund.de, Andrea Preusser

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

     <URL: http://svmlight.joachims.org/>

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

     'predict.svmlight','svm',

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

     ## Not run: 
     ## Only works if the svmlight binaries are in the path.
     data(iris)
     x <- svmlight(Species ~ ., data=iris)
     ## End(Not run)

