support                package:arules                R Documentation

_S_u_p_p_o_r_t _C_o_u_n_t_i_n_g _f_o_r _I_t_e_m_s_e_t_s

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

     Provides the generic function and the needed S4 method to count
     support for given itemsets (and other types of associations) in a
     given transaction database.

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

     support(x, transactions, ...)
     ## S4 method for signature 'itemMatrix, transactions':
     support(x, transactions, 
         type= c("relative", "absolute"), control = NULL)
     ## S4 method for signature 'associations, transactions':
     support(x, transactions, 
         type= c("relative", "absolute"), control = NULL)

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

       x: the set of itemsets for which support should be counted. 

     ...: further arguments are passed on. 

transactions: the transaction data set used for mining. 

    type: a character string specifying if '"relative"'  support or 
          '"absolute"' support (counts) are returned for the itemsets
          in 'x'.  (default:  '"relative"')

 control: a named list with elements  'method' indicating the method
          ('"tidlists"' or '"ptree"'), and the logical arguments
          'reduce' and 'verbose' to indicate if unused items are
          removed and if  the output should be verbose.

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

     Normally, itemset support is counted during mining the database
     with a set minimum support. However, if only the support
     information  for a single or a few itemsets is needed, one might
     not want to  mine the database for all frequent itemsets.

     If in control 'method = "tidlists"' is used, support is counted
     using transaction ID list intersection which is used by several
     fast mining algorithms (e.g., by Eclat). However, Support is
     determined for each itemset individually which is slow for a large
     number of long itemsets in dense data. 

     If in control 'method = "ptree"' is used,  the counters for the
     itemsets are  organized in a prefix tree. The transactions are
     sequencially processed and the corresponding counters in the
     prefix tree are incremented. 

     If in control 'reduce = TRUE' is used, unused items are removed
     from the data before creating rules. This might be slower for
     large transaction data sets.

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

     A numeric vector of the same length as 'x' containing the support
     values for the sets in 'x'.

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

     'itemMatrix-class',  'associations-class',  'transactions-class'

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

     data("Income")

     ## find and some frequent itemsets
     itemsets <- eclat(Income)[1:5]

     ## inspect the support returned by eclat
     inspect(itemsets)

     ## count support in the database
     support(items(itemsets), Income)

