Learn R Programming

arules (version 0.1-3)

tidList-class: Class ``tidList'' --- A Transaction ID List

Description

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.

Arguments

Objects from the Class

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", ...).

Methods

[{signature(x = "tidList"); extracts parts (transaction ID vectors) from the tidList. The argument selects the item or itemset.} coerce{signature(from = "tidList", to = "dgCMatrix"); access the sparse matrix representation. In the dgCMatrix each column represents the transaction IDs for one item/itemset.} coerce{signature(from = "tidList", to = "list")} coerce{signature(from = "tidList", to = "matrix")} coerce{signature(from = "tidList", to = "transactions")} coerce{signature(from = "transactions", to = "tidList")} decode{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.} labels{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.} transactionInfo{signature(x = "transactions"): returns transactionInfo} show{signature(object = "tidList")} summary{signature(object = "tidList")}

See Also

eclat, itemsets-class

Examples

Run this code
## 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")

Run the code above in your browser using DataLab