arulesCBA (version 1.1.3-1)

mineCARs: Mine Class Association Rules

Description

Class Association Rules (CARs) are association rules that have only items with class values in the RHS (Liu, et al., 1998).

Usage

mineCARs(formula, data, parameter = NULL, control = NULL, ...)

Arguments

formula

A symbolic description of the model to be fitted.

data

An object of class transactions containing the training data.

parameter, control

Optional parameter and control lists for the apriori algorithm.

...

Additional parameters are currently ignored.

Value

Returns an object of class rules.

References

Liu, B. Hsu, W. and Ma, Y (1998). Integrating Classification and Assocoiation Rule Mining. KDD'98 Proceedings of the Fourth International Conference on Knowledge Discovery and Data Mining, New York, 27-31 August. AAAI. pp. 80-86.

See Also

apriori, rules, transactions.

Examples

Run this code
# NOT RUN {
data("iris")

iris.disc <- discretizeDF.supervised(Species ~ ., iris)
iris.trans <- as(iris.disc, "transactions")

# mine CARs with items for "Species" in the RHS
cars <- mineCARs(Species ~ ., iris.trans, parameter = list(support = 0.3))
inspect(cars)

# restrict the predictors to items starting with "Sepal"
cars <- mineCARs(Species ~ Sepal, iris.trans, parameter = list(support = 0.1))
inspect(cars)
# }

Run the code above in your browser using DataCamp Workspace