predict.apriori | R Documentation |
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".
## S3 method for class 'apriori'
predict(object, test, unmatched = "Unknown", ...)
object |
The classification model (of class |
test |
The test set (a |
unmatched |
The class label given to the unmatched observations (a character string). |
... |
Other parameters. |
A vector of predicted values (factor
).
APRIORI
, apriori-class
, apriori
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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.