prepareTransactions: Helper to Convert Data into Transactions

Description Usage Arguments Value Author(s) See Also Examples

View source: R/prepareTransactions.R

Description

Converts a data.frame into transactions by applying class-based discretization.

Usage

1
prepareTransactions(formula, data, disc.method = "mdlp", match = NULL)

Arguments

formula

the formula.

data

a data.frame with the data.

disc.method

Discretization method used to discretize continuous variables if data is a data.frame (default: "mdlp"). See discretizeDF.supervised for more supervised discretization methods.

match

typically NULL. Only used internally if data is a already a set of transactions.

Value

An object of class transactions from arules with an attribute called "disc_info" that contains information on the used discretization for each column.

Author(s)

Michael Hahsler

See Also

transactions.

Examples

1
2
3
4
data("iris")

iris_trans <- prepareTransactions(Species ~ ., iris)
iris_trans

arulesCBA documentation built on April 20, 2020, 5:06 p.m.