R/Weka Rule Learners
R interfaces to Weka rule learners.
JRip(formula, data, subset, na.action, control = Weka_control(), options = NULL) M5Rules(formula, data, subset, na.action, control = Weka_control(), options = NULL) OneR(formula, data, subset, na.action, control = Weka_control(), options = NULL) PART(formula, data, subset, na.action, control = Weka_control(), options = NULL)
- a symbolic description of the model to be fit.
- an optional data frame containing the variables in the model.
- an optional vector specifying a subset of observations to be used in the fitting process.
- a function which indicates what should happen when
the data contain
- an object of class
Weka_controlgiving options to be passed to the Weka learner. Available options can be obtained on-line using the Weka Option Wizard
- a named list of further options, or
NULL(default). See Details.
JRip implements a propositional rule learner,
M5Rules generates a decision list for regression problems using
separate-and-conquer. In each iteration it builds an model tree using
M5 and makes the
OneR builds a simple 1-R classifier, see Holte (1993).
PART generates PART decision lists using the approach of Frank
and Witten (1998).
The model formulae should only use the + and - operators to indicate the variables to be included or not used, respectively.
options allows further customization. Currently,
instances (or partial matches for
these) are used: if set to
TRUE, the model frame or the
corresponding Weka instances, respectively, are included in the fitted
model object, possibly speeding up subsequent computations on the
object. By default, neither is included.
- A list inheriting from classes
Weka_classifierswith components including
classifier a reference (of class
jobjRef) to a Java object obtained by applying the Weka
buildClassifiermethod to build the specified model using the given control options.
predictions a numeric vector or factor with the model predictions for the training instances (the results of calling the Weka
classifyInstancemethod for the built classifier and each instance).
call the matched call.
W. W. Cohen (1995).
Fast effective rule induction.
In A. Prieditis and S. Russell (eds.),
Proceedings of the 12th International Conference on Machine
Learning, pages 115--123.
M. Hall, G. Holmes, and E. Frank (1999).
Generating rule sets from model trees.
Proceedings of the Twelfth Australian Joint Conference on
Artificial Intelligence, Sydney, Australia, pages 1--12.
R. C. Holte (1993). Very simple classification rules perform well on most commonly used datasets. Machine Learning, 11, 63--91.
I. H. Witten and E. Frank (2005). Data Mining: Practical Machine Learning Tools and Techniques. 2nd Edition, Morgan Kaufmann, San Francisco.
M5Rules(mpg ~ ., data = mtcars) m <- PART(Species ~ ., data = iris) m summary(m)