Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.apriori

Model predictions


Description

This function predicts values based upon a model trained by apriori.classif. Observations that do not match any of the rules are labelled as "unmatched".

Usage

## S3 method for class 'apriori'
predict(object, test, unmatched = "Unknown", ...)

Arguments

object

The classification model (of class apriori, created by apriori.classif).

test

The test set (a data.frame)

unmatched

The class label given to the unmatched observations (a character string).

...

Other parameters.

Value

A vector of predicted values (factor).

See Also

Examples

require ("datasets")
data (iris)
d = discretizeDF (iris,
    default = list (method = "interval", breaks = 3, labels = c ("small", "medium", "large")))
model = APRIORI (d [, -5], d [, 5], supp = .1, conf = .9, prune = TRUE)
predict (model, d [, -5])

fdm2id

Data Mining and R Programming for Beginners

v0.9.5
GPL-3
Authors
Alexandre Blansché [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.