tidList-class {arules}R Documentation

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.

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

Slots

data:
object of class dgCMatrix (see itemMatrix)
labels:
object of class "data.frame" always an empty data.frame for transaction ID lists.
transactionInfo:
object of class "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.

Methods

[
signature(x = "tidList"); extracts parts (transaction ID vectors) from the tidList. The argument selects the item or 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.
transactionInfo
signature(x = "transactions"): returns transactionInfo
show
signature(object = "tidList")
summary
signature(object = "tidList")

Author(s)

Michael Hahsler

See Also

eclat, itemsets-class

Examples

## 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")

[Package arules version 0.1-0 Index]