classifly             package:classifly             R Documentation

_C_l_a_s_s_i_f_y _a_n_d _e_x_p_l_o_r_e _a _d_a_t_a _s_e_t

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

     Classifly provides a convenient method to fit a classification
     function

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

     classifly(data, model, classifier, ..., n=10000, method="nonaligned", type="range")

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

    data: Data set use for classification

   model: Classification formula, usually of the form response ~
          predictors

classifier: Function to use for the classification, eg 'lda'

     ...: Other arguments passed to classification function.  For
          example. if you use 'svm' you need to use 'probabiltiy =
          TRUE' so that posterior probabilities can be retrieved.

       n: Number of points to simulate.  To maintain the illusion of a
          filled solid this needs to increase with dimension.  10,000
          points seems adequate for up to four of five dimensions, but
          if you have more predictors than that, you will need to
          increase this number.

  method: method to simulate points: grid, random or nonaligned
          (default).  See 'simvar' for more details on the methods
          used.

    type: type of scaling to apply to data.  Defaults to commmon range.
           See 'rescaler' for more details.

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

     This is a convenient function to fit a classification function and
     then explore the results using GGobi.  You can also do this in two
     separate steps using the classification function and then
     'explore'.

     By default in GGobi, points that are not on the boundary (ie. that
     have an advantage greater than the 5 to brush mode and choose
     include shadowed points from the brush menu on the plot window. 
     You can then brush them yourself to explore how the certainty of
     classification varies throughout the space

     Special notes:

        *  You should make sure the response variable is a factor

        *  For SVM, make sure to include 'probability = TRUE' in the
           arguments to 'classifly'

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

     Hadley Wickham <h.wickham@gmail.com>

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

     'explore', <URL: http://had.co.nz/classifly>

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

     classifly(kyphosis, Kyphosis ~ . , lda)
     classifly(kyphosis, Kyphosis ~ poly(Age,2) + poly(Number,2) + poly(Start,2) , lda)
     classifly(kyphosis, Kyphosis ~ . , qda)
     classifly(kyphosis, Kyphosis ~ . , rpart)
     classifly(kyphosis, Kyphosis ~ . , knnf, k=3)
     classifly(kyphosis, Kyphosis ~ . , glm, family="binomial")

     classifly(kyphosis, Kyphosis ~ . , svm, probability=TRUE)
     classifly(kyphosis, Kyphosis ~ . , svm, probability=TRUE, kernel="linear")
     classifly(kyphosis, Kyphosis ~ . , best.svm, probability=TRUE, kernel="linear")

     #Also can use explore directorly
     bsvm <- best.svm(Species~., data = iris, gamma = 2^(-1:1), cost = 2^(2:+ 4), probability=TRUE)
     explore(bsvm, iris)

