aggregator-class           package:Biobase           R Documentation

_C_l_a_s_s _a_g_g_r_e_g_a_t_o_r, _a _c_l_a_s_s _o_f _a_g_g_r_e_g_a_t_o_r_s

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

     A class of objects designed to help aggregate calculations over an
     iterative computation. The aggregator consists of three objects.
     An environment to hold the values. A function that sets up an
     initial value the first time an object is seen. An aggregate
     function that increments the value of an object seen previously.

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

     This class is used to help aggregate different values over
     function calls. A very simple example is to use leave one out
     cross-validation for prediction. At each stage we first perform
     feature selection and then cross-validate. To keep track of how
     often each feature is selected we can use an aggregator. At the
     end of the cross-validation we can extract the names of the
     features chosen from 'aggenv'.

_C_r_e_a_t_i_n_g _O_b_j_e_c_t_s:

     '  new('aggregator','
      '    aggenv  = ..../, # Object of class environment'
      '    initfun = ...., # Object of class function'
      '    aggfun  = ...., # Object of class function'
      '  )'

_S_l_o_t_s:

     '_a_g_g_e_n_v': Object of class "environment", holds the values between
          iterations. 

     '_i_n_i_t_f_u_n': Object of class "function" specifies how to initialize
          the value for a name the first time it is encountered. 

     '_a_g_g_f_u_n': Object of class "function" used to increment (or perform
          any other function) on a name. 

_P_r_o_t_o_t_y_p_e:

     describe{

'_a_g_g_e_n_v': 'new.env(hash=TRUE)' 

'_i_n_i_t_f_u_n': 'function(name, val) 1' 

'_a_g_g_f_u_n': 'function(name, current, val) current+1'  }

_M_e_t_h_o_d_s:

     _a_g_g_e_n_v (aggregator): Used to access the environment of the
          aggregator. 

     _a_g_g_f_u_n (aggregator): Used to access the function that aggregates. 

     _i_n_i_t_f_u_n (aggregator): Used to access the initializer function. 

