| tidList-class {arules} | R Documentation |
The tidList class is used by the
itemsets class to store the IDs of the
transaction which support each mined itemsets. Only the
implementation of the Eclat mining algorithm produces transaction IDs.
tidList uses the itemMatrix
class to efficiently store the transaction ID lists as a sparse matrix.
Objects are created by Eclat if the eclat function is
called with tidList = TRUE in the
ECparameter object.
Objects can also be created by calls of the form
new("tidList", ...).
data:dgCMatrix (see
itemMatrix)itemInfo:"data.frame" always an
empty data.frame for transaction ID lists.transactionInfo:"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.
signature(x = "tidList");
extracts parts (transaction ID vectors) from the tidList.
The argument selects the item or itemset.signature(from = "tidList", to = "dgCMatrix");
access the sparse matrix representation. In the
dgCMatrix each column represents the transaction IDs
for one item/itemset.signature(from = "tidList", to = "list")signature(from = "tidList", to = "matrix")signature(from = "tidList", to = "transactions")signature(from = "transactions", to = "tidList")signature(x = "tidList");
decodes the numeric transaction codes (column numbers in the
tidList) given in argument tids to the transaction IDs stored
in x. tids can be a vector or list.signature(x = "transactions");
returns the labels (item labels and transaction IDs)
for the incidence matrix as a list of two vectors named items
and transactionIDs.signature(x = "transactions"):
returns transactionInfosignature(object = "tidList")signature(object = "tidList")Michael Hahsler
## 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 tidList.
f <- eclat(data, parameter = list(support = 0, tidList = TRUE))
## Get dimensions of the tidList.
dim(tidList(f))
## Coerce tidList to list.
as(tidList(f), "list")