support-methods

0th

Percentile

Support Counting for Sequences

Compute the relative or absolute support of an arbitrary collection of sequences among a set of transactions with additional sequence and temporal information.

Keywords
models
Usage
# S4 method for sequences
support(x, transactions, type= c("relative", "absolute"),
           control = NULL)

# S4 method for sequences supportingTransactions(x, transactions, …)

Arguments
x
an object.
transactions
an object of class transactions or .
type
a character value specifying the scale of support (relative or absolute).
control
a named list with logical component verbose specifying if progress and runtime information should be displayed and list component parameter (see details).
currently not used.
Details

Provides support counting using either method ptree (default), or idlists (for details see the reference in cspade) and timing constraints.

parameter can be an object of class or a named list with corresponding components. Note that constraints which do not relate to the timing information of transactions are ignored.

If sequences are used for transactions missing event times are replaced with the order indexes of events.

The supporting sequences are all sequences (of transactions) of which the sequence representing the association is a subset of.

Note that supportingTransactions does not support timing constraints.

Value

For support a numeric vector the elements of which correspond with the elements of x.

For supportingTransactions an object of class tidLists containing one sequence ID list per association in x.

See Also

Class , method ruleInduction, function cspade, read_baskets.

Aliases
  • support
  • support,sequences-method
  • supportingTransactions,sequences-method
Examples
## continue example
example(cspade)

## recompute support
s <- support(s2, zaki, control = list(verbose = TRUE, 
                     parameter = list(maxwin = 5)))
data.frame(as(s2, "data.frame"), support = s)

## use default method
k <- support(s2, zaki, control = list(verbose = TRUE))
table(size(s2), sign(k - s))

## the same
s <- supportingTransactions(s2, zaki)
itemFrequency(s)
Documentation reproduced from package arulesSequences, version 0.2-19, License: GPL-2

Community examples

Looks like there are no examples yet.