RWeka (version 0.2-1)

Weka_classifier_functions: R/Weka Classifier Functions

Description

R interfaces to Weka regression and classification function learners.

Usage

LinearRegression(formula, data, subset, na.action, control = Weka_control())
Logistic(formula, data, subset, na.action, control = Weka_control())
SMO(formula, data, subset, na.action, control = Weka_control())

Arguments

formula
a symbolic description of the model to be fit.
data
an optional data frame containing the variables in the model.
subset
an optional vector specifying a subset of observations to be used in the fitting process.
na.action
a function which indicates what should happen when the data contain NAs.
control
an object of class Weka_control. Available options can be obtained on-line using the Weka Option Wizard WOW, or the Weka documentation.

Value

  • A list inheriting from classes Weka_functions and Weka_classifiers with components including
  • classifiera reference (of class jobjRef) to a Java object obtained by applying the Weka buildClassifier method to build the specified model using the given control options.
  • predictionsa numeric vector or factor with the model predictions for the training instances (the results of calling the Weka classifyInstance method for the built classifier and each instance).
  • callthe matched call.

Details

There is a predict method for predicting from the fitted models.

LinearRegression builds suitable linear regression models, using the Akaike criterion for model selection.

Logistic builds multinomial logistic regression models based on ridge estimation (le Cessie and van Houwelingen, 1992).

SMO implements John C. Platt's sequential minimal optimization algorithm for training a support vector classifier using polynomial or RBF kernels. Multi-class problems are solved using pairwise classification.

The model formulae should only use + to indicate the variables to be included.

References

J. C. Platt (1998). Fast training of Support Vector Machines using Sequential Minimal Optimization. In B. Schoelkopf, C. Burges, and A. Smola (eds.), Advances in Kernel Methods --- Support Vector Learning. MIT Press.

I. H. Witten and Eibe Frank (2005). Data Mining: Practical Machine Learning Tools and Techniques. 2nd Edition, Morgan Kaufmann, San Francisco.