coverage               package:arules               R Documentation

_C_a_l_c_u_l_a_t_e _c_o_v_e_r_a_g_e _f_o_r _r_u_l_e_s

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

     Provides the generic function and the needed S4 method to
     calculate the coverage (support of the left-hand-side) of rules.

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

     coverage(x)

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

       x: the set of rules. 

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

     Coverage is calculated from the rules quality measures  (support
     and confidence) stored in the quality slot.

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

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

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

     'rules-class'

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

     data("Income")

     ## find and some rules (we only use 5 rules here) and calculate coverage
     rules <- apriori(Income)[1:5]
     quality(rules) <- cbind(quality(rules), coverage = coverage(rules))

     inspect(rules)

