LUCS_KDD_CBA: Interface to the LUCS-KDD Implementations of CMAR, PRM and...

LUCS_KDD_CBAR Documentation

Interface to the LUCS-KDD Implementations of CMAR, PRM and CPAR

Description

Interface for the LUCS-KDD Software Library Java implementations of CMAR (Li, Han and Pei, 2001), PRM, and CPAR (Yin and Han, 2003). Note: The Java implementations is not part of arulesCBA and is only free for non-commercial use.

Usage

FOIL2(formula, data, best_k = 5, disc.method = "mdlp", verbose = FALSE)

CPAR(formula, data, best_k = 5, disc.method = "mdlp", verbose = FALSE)

PRM(formula, data, best_k = 5, disc.method = "mdlp", verbose = FALSE)

CMAR(
  formula,
  data,
  support = 0.1,
  confidence = 0.5,
  disc.method = "mdlp",
  verbose = FALSE
)

Arguments

formula

a symbolic description of the model to be fitted. Has to be of form class ~ . or class ~ predictor1 + predictor2.

data

A data.frame or arules::transactions containing the training data. Data frames are automatically discretized and converted to transactions with prepareTransactions().

best_k

use average expected accuracy of the best k rules per class for prediction.

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.

verbose

Show verbose output?

support, confidence

minimum support and minimum confidence thresholds for CMAR (range [0, 1]).

Details

Requirement: The code needs a JDK (Java Software Development Kit) Version 1.8 (or higher) installation. On some systems (Windows), you may need to set the JAVA_HOME environment variable so the system finds the compiler.

Memory: The memory for Java can be increased via R options. For example: options(java.parameters = "-Xmx1024m")

Note: The implementation does not expose the min. gain parameter for CPAR, PRM and FOIL2. It is fixed at 0.7 (the value used by Yin and Han, 2001). FOIL2 is an alternative Java implementation to the native implementation of FOIL already provided in the arulesCBA. FOIL exposes min. gain.

Value

Returns an object of class CBA representing the trained classifier.

References

Li W., Han, J. and Pei, J. CMAR: Accurate and Efficient Classification Based on Multiple Class-Association Rules, ICDM, 2001, pp. 369-376.

Yin, Xiaoxin and Jiawei Han. CPAR: Classification based on Predictive Association Rules, SDM, 2003. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1137/1.9781611972733.40")}

Frans Coenen et al. The LUCS-KDD Software Library, University of Liverpool, 2013.

See Also

Other classifiers: CBA(), CBA_helpers, CBA_ruleset(), FOIL(), RCAR(), RWeka_CBA

Examples

# make sure you have a Java SDK Version 1.4.0+ and not a headless installation.
system("java -version")

data("iris")

# build a classifier, inspect rules and make predictions
cl <- CMAR(Species ~ ., iris, support = .2, confidence = .8, verbose = TRUE)
cl

inspect(cl$rules)
predict(cl, head(iris))

cl <- CPAR(Species ~ ., iris)
cl

cl <- PRM(Species ~ ., iris)
cl

cl <- FOIL2(Species ~ ., iris)
cl

arulesCBA documentation built on May 29, 2024, 11:49 a.m.