Learn R Programming

RWeka (version 0.4-47)

Weka_associators: R/Weka Associators

Description

R interfaces to Weka association rule learning algorithms.

Usage

Apriori(x, control = NULL)
Tertius(x, control = NULL)

Value

A list inheriting from class Weka_associators with components including

associator

a reference (of class jobjRef) to a Java object obtained by applying the Weka buildAssociations method to the training instances using the given control options.

Arguments

x

an R object with the data to be associated.

control

an object of class Weka_control, or a character vector of control options, or NULL (default). Available options can be obtained on-line using the Weka Option Wizard WOW, or the Weka documentation.

Details

Apriori implements an Apriori-type algorithm, which iteratively reduces the minimum support until it finds the required number of rules with the given minimum confidence.

Tertius implements a Tertius-type algorithm.

See the references for more information on these algorithms.

References

Agrawal+Srikant:1994, Flach+Lachiche:2001, Witten+Frank:2005

Examples

Run this code
x <- read.arff(system.file("arff", "contact-lenses.arff",
                           package = "RWeka"))
## Apriori with defaults.
Apriori(x)
## Some options: set required number of rules to 20.

Apriori(x, Weka_control(N = 20))

if (FALSE) {
## Requires Weka package 'tertius' to be installed.
## Tertius with defaults.
Tertius(x)
## Some options: only classification rules (single item in the RHS).

Tertius(x, Weka_control(S = TRUE))
}

Run the code above in your browser using DataLab