supportingTransactions: Supporting Transactions

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Find transactions which support each of a set of associations and return this information as a transaction ID list.

Usage

1

Arguments

x

a set of associations (itemsets, rules, etc.)

transactions

an object of class transactions used to mine the associations in x.

...

currently unused.

Details

The supporting transactions are all transactions of which the itemset representing the association is a subset of.

Value

An object of class tidLists containing one transaction ID list per association in x.

Author(s)

Michael Hahsler

See Also

tidLists-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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")
	)
data <- as(data, "transactions")

## mine itemsets
f <- eclat(data, parameter = list(support = .2, minlen=3))
inspect(f)

## find supporting Transactions
st <- supportingTransactions(f, data)
st

as(st, "list")

Example output

Loading required package: Matrix

Attaching package: 'arules'

The following objects are masked from 'package:base':

    abbreviate, write

Eclat

parameter specification:
 tidLists support minlen maxlen            target   ext
    FALSE     0.2      3     10 frequent itemsets FALSE

algorithmic control:
 sparse sort verbose
      7   -2    TRUE

Absolute minimum support count: 2 

create itemset ... 
set transactions ...[5 item(s), 10 transaction(s)] done [0.00s].
sorting and recoding items ... [5 item(s)] done [0.00s].
creating bit matrix ... [5 row(s), 10 column(s)] done [0.00s].
writing  ... [2 set(s)] done [0.00s].
Creating S4 object  ... done [0.00s].
    items   support count
[1] {a,d,e} 0.2     2    
[2] {a,b,d} 0.3     3    
tidLists in sparse format with
 2 items/itemsets (rows) and
 10 transactions (columns)
$`{a,d,e}`
[1]  6 10

$`{a,b,d}`
[1]  3  8 10

arules documentation built on April 7, 2018, 9:03 a.m.