build {rCBA} | R Documentation |
Build classifier function (Apriori-based)
Description
Automatic build of the classification model using the Apriori algorithm from the arules
Usage
build(trainData, className = NA, pruning = TRUE, sa = list(),
verbose = TRUE, parallel = TRUE)
Arguments
trainData |
|
className |
column name with the target class - default is the last column |
pruning |
performing pruning while building the model |
sa |
simulated annealing setting. Default values: list(temp=100.0, alpha=0.05, tabuRuleLength=5, timeout=10) |
verbose |
verbose indicator |
parallel |
parallel indicator |
Value
list with parameters and model as data.frame with rules
Examples
library("rCBA")
data("iris")
output <- rCBA::build(iris,sa = list(alpha=0.5), parallel=FALSE) # speeding up the cooling
model <- output$model
predictions <- rCBA::classification(iris, model)
table(predictions)
sum(as.character(iris$Species)==as.character(predictions), na.rm=TRUE) / length(predictions)
[Package rCBA version 0.4.3 Index]