itemsets-class            package:arules            R Documentation

_C_l_a_s_s "_i_t_e_m_s_e_t_s" - _A _S_e_t _o_f _I_t_e_m_s_e_t_s

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

     The 'itemsets' class represents a set of itemsets and the
     associated quality measures. 

     Note that the class can also contain a collection of itemsets with
     duplicated elements. Duplicated elements can be removed with
     'unique'.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects are the result of calling the functions 'apriori' (e.g.,
     with 'target="frequent itemsets"' in the parameter list)  or
     'eclat'. Objects can also be created by calls of the form
     'new("itemsets", ...)'.

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

     '_i_t_e_m_s': object of class 'itemMatrix' containing the  items in the
          set of itemsets

     '_q_u_a_l_i_t_y': a data.frame containing the quality measures for the
          itemsets

     '_t_i_d_L_i_s_t_s': object of class 'tidLists' containing the IDs of the
          transactions which support each itemset.  The slot contains
          'NULL' if no transactions ID list is available (transactions
          ID lists are only available for 'eclat').

_E_x_t_e_n_d_s:

     Class 'associations', directly.

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

     _c_o_e_r_c_e 'signature(from = "itemsets", to = "data.frame")';
          represent the itemsets in readable form

     _i_t_e_m_s 'signature(x = "itemsets")'; returns the 'itemMatrix'
          representing the set of itemsets

     _i_t_e_m_s<- 'signature(x = "itemsets")'; replaces the 'itemMatrix'
          representing the set of itemsets

     _i_t_e_m_I_n_f_o 'signature(object = "itemsets")';  returns the whole item
          information data frame including item labels

     _l_a_b_e_l_s 'signature(object = "itemsets")'; returns labels for the
          itemsets as a character vector. The labels have te following
          format:  "{item1, item2,..., itemn}"

     _i_t_e_m_L_a_b_e_l_s 'signature(object = "itemsets")'; returns the item
          labels used to encode the itemsets as a character vector. The
          index for each lable is the column index of the item in the
          binary matrix.

     _s_u_m_m_a_r_y 'signature(object = "itemsets")'

     _t_i_d_L_i_s_t_s 'signature(object = "itemsets")'; returns the transaction
          ID list

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

     '[-methods', 'apriori', 'c', 'duplicated', 'eclat', 'inspect',
     'is.maximal', 'length', 'match', 'sets', 'size', 'subset',
     'associations-class',  'tidLists-class'

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

     data("Adult")

     ## Mine frequent itemsets with Eclat.
     fsets <- eclat(Adult, parameter = list(supp = 0.5))

     ## Display the 5 itemsets with the highest support.
     fsets.top5 <- SORT(fsets)[1:5]
     inspect(fsets.top5)

     ## Get the itemsets as a list
     as(items(fsets.top5), "list")

     ## Get the itemsets as a binary matrix
     as(items(fsets.top5), "matrix")

     ## Get the itemsets as a sparse matrix, a ngCMatrix from package Matrix.
     ## Warning: for efficiency reasons, the ngCMatrix you get is transposed 
     as(items(fsets.top5), "ngCMatrix")

