tidLists-class            package:arules            R Documentation

_C_l_a_s_s "_t_i_d_L_i_s_t_s" - _T_r_a_n_s_a_c_t_i_o_n _I_D _L_i_s_t_s _f_o_r _I_t_e_m_s/_I_t_e_m_s_e_t_s

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

     Transaction ID lists contains a set of lists.  Each list is
     associated with an item/itemset and stores the IDs of the
     transactions which support the item/itemset.  'tidLists' uses the
     class 'ngCMatrix' to efficiently store the transaction ID lists as
     a sparse matrix.  Each column in the matrix represents one
     transaction ID list.

     'tidLists' can be used for different purposes.  For some
     operations (e.g., support counting) it is efficient to coerce a
     'transactions' database into 'tidLists' where each list contains
     the transaction IDs for an item (and the support is given by the
     length of the list).

     The implementation of the Eclat mining algorithm (which uses
     transaction ID list intersection) can also produce transaction ID
     lists for the found itemsets as part of the returned 'itemsets'
     object.  These lists can then be used for further computation.

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

     Objects are created by Eclat if the 'eclat' function is called
     with 'tidLists = TRUE' in the 'ECparameter' object, and returned
     as part of the mined 'itemsets'.  Objects can also be created by
     coercion from an object of class 'transactions' or by calls of the
     form 'new("tidLists", ...)'.

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

     '_d_a_t_a': object of class 'ngCMatrix'.

     '_i_t_e_m_I_n_f_o': always an empty data.frame for transaction ID lists.

     '_t_r_a_n_s_a_c_t_i_o_n_I_n_f_o': a data.frame with vectors of the same length as
          the number of transactions.  Each vector can hold additional
          information e.g., store transaction IDs or user IDs for each
          transaction.

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

     _c_o_e_r_c_e 'signature(from = "tidLists", to = "ngCMatrix")'; access
          the sparse matrix representation. In the 'ngCMatrix' each
          column represents the transaction IDs for one item/itemset.

     _c_o_e_r_c_e 'signature(from = "tidLists", to = "dgCMatrix")'

     _c_o_e_r_c_e 'signature(from = "tidLists", to = "list")'

     _c_o_e_r_c_e 'signature(from = "tidLists", to = "matrix")'

     _c_o_e_r_c_e 'signature(from = "tidLists", to = "itemMatrix")'

     _c_o_e_r_c_e 'signature(from = "tidLists", to = "transactions")'

     _c_o_e_r_c_e 'signature(from = "itemMatrix", to = "tidLists")'

     _c_o_e_r_c_e 'signature(from = "transactions", to = "tidLists")'

     _d_i_m 'signature(x = "tidLists")'; returns the dimensions of the
          sparse Matrix representing the  'tidLists'.

     _i_t_e_m_I_n_f_o returns the slot 'itemInfo'.

     _i_t_e_m_L_a_b_e_l_s 'signature(object = "tidLists")'; returns the item
          labels as a character vector.

     _l_a_b_e_l_s 'signature(x = "transactions")'; returns the labels (item
          labels and transaction IDs) for the incidence matrix as a
          list of two vectors named 'items' and 'transactionID'.

     _s_h_o_w 'signature(object = "tidLists")'

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

     _t_r_a_n_s_a_c_t_i_o_n_I_n_f_o 'signature(x = "transactions")': returns the slot
          'transactionInfo'.

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

     '[-methods', 'LIST', 'eclat', 'image', 'length', 'size',
     'ngCMatrix' (in 'Matrix'), 'itemMatrix-class', 'itemsets-class',
     'transactions-class'

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

     ## Create transaction data set.
     data <- list(
       c("a","b","c"),
       c("a","b"),
       c("a","b","d"),
       c("b","e"),
       c("b","c","e"),
       c("a","d","e"),
       c("a","c"),
       c("a","b","d"),
       c("c","e"),
       c("a","b","d","e")
       )
     t <- as(data, "transactions")

     ## Mine itemsets with tidLists.
     f <- eclat(data, parameter = list(support = 0, tidLists = TRUE))

     ## Get dimensions of the tidLists.
     dim(tidLists(f))

     ## Coerce tidLists to list.
     as(tidLists(f), "list")

     ## Inspect visually. 
     image(tidLists(f))

