fs.absT             package:MLInterfaces             R Documentation

_s_u_p_p_o_r_t _f_o_r _f_e_a_t_u_r_e _s_e_l_e_c_t_i_o_n _i_n _c_r_o_s_s-_v_a_l_i_d_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     support for feature selection in cross-validation

_U_s_a_g_e:

     fs.absT(N)
     fs.probT(p)
     fs.topVariance(p)

_A_r_g_u_m_e_n_t_s:

       N: number of features to retain; features are ordered by
          descending value of abs(two-sample t stat.), and the top N
          are used. 

       p: cumulative probability (in (0,1)) in the distribution of
          absolute t statistics above which we retain features

_D_e_t_a_i_l_s:

     This function returns a function that will be used as a parameter
     to 'xvalSpec' in applications of 'MLearn'.

_V_a_l_u_e:

     a function is returned, that will itself return a formula
     consisting of the selected features for application of 'MLearn'.

_N_o_t_e:

     The functions 'fs.absT' and 'fs.probT' are two examples of
     approaches to embedded feature selection that make sense for
     two-sample prediction problems.  For selection based on linear
     models or other discrimination measures, you will need to create
     your own selection helper, following the code in these functions
     as examples.

     fs.topVariance performs non-specific feature selection based on
     the  variance.  Argument p is the variance percentile beneath
     which features are discarded.

_A_u_t_h_o_r(_s):

     VJ Carey <stvjc@channing.harvard.edu>

_S_e_e _A_l_s_o:

     'MLearn'

_E_x_a_m_p_l_e_s:

     # we will demonstrate this procedure with the crabs data.
     # first, create the closure to pick 3 features
     demFS = fs.absT(3)
     # run it on the entire dataset with features excluding sex
     demFS(sp~.-sex, crabs)
     # emulate cross-validation by excluding last 50 records
     demFS(sp~.-sex, crabs[1:150,])
     # emulate cross-validation by excluding first 50 records -- different features retained
     demFS(sp~.-sex, crabs[51:200,])

