Data Mining Algorithms In R/Packages/RWeka/Predict Weka Classifier

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Description[edit | edit source]

Predicted values based on fitted Weka classifier models.

Usage[edit | edit source]

predict(object, newdata = NULL, type = c("class", "probability"), ...)

Arguments[edit | edit source]

object, an object of class inheriting from Weka_classifier. newdata, an optional data frame in which to look for variables with which to predict. If omitted or NULL, the training instances are used. type, character string determining whether classes should be predicted (numeric for regression, factor for classification) or class probabilities (only available for classification). Further arguments passed to or from other methods.

Value[edit | edit source]

Either a vector with classes or a matrix with the posterior class probabilities, with rows corresponding to instances and columns to classes.