qCBA (version 0.3)

qcba: qCBA Quantitative CBA

Description

Creates QCBA model by from a CBA rule model. The default values are set so that the function postprocesses CBA models, reducing their size. The resulting model has the same structure as CBA model: it is composed of an ordered list of crisp conjunctive rules, intended to be applied for one-rule classification. The experimental annotate and fuzzification parameters will trigger more complex postprocessing of CBA models: rules will be annotated with probability distributions and optionally fuzzy borders. The intended use of such models is multi-rule classification. The predict function automatically determines whether the input model is a CBA model or an annotated model.

Usage

qcba(cbaRuleModel, datadf, extendType = "numericOnly",
  defaultRuleOverlapPruning = "transactionBased", attributePruning = TRUE,
  trim_literal_boundaries = TRUE, continuousPruning = FALSE,
  postpruning = "cba", fuzzification = FALSE, annotate = FALSE,
  ruleOutputPath, minImprovement = 0, minCondImprovement = -1,
  minConf = 0.5,
  extensionStrategy = "ConfImprovementAgainstLastConfirmedExtension",
  loglevel = "WARNING", createHistorySlot = FALSE, timeExecution = FALSE)

Arguments

cbaRuleModel
datadf

data frame with training data

extendType

possible extend types - numericOnly or noExtend

defaultRuleOverlapPruning

pruning removing rules made redundant by the default rule; possible values: noPruning, transactionBased, rangeBased, transactionBasedAsFirstStep

attributePruning

remove redundant attributes

trim_literal_boundaries

trimming of literal boundaries enabled

continuousPruning

indicating continuous pruning is enabled

postpruning

type of postpruning (none, cba - data coverage pruning, greedy - data coverage pruning stopping on first rule with total error worse than default)

fuzzification

boolean indicating if fuzzification is enabled. Multi-rule classification model is produced if enabled. Fuzzification without annotation is not supported.

annotate

boolean indicating if annotation with probability distributions is enabled, multi-rule classification model is produced if enabled

ruleOutputPath

path of file to which model will be saved. Must be set if multi rule classification is produced.

minImprovement

parameter ofqCBA extend procedure (used when extensionStrategy=ConfImprovementAgainstLastConfirmedExtension or ConfImprovementAgainstSeedRule)

minCondImprovement

parameter ofqCBA extend procedure

minConf

minimum confidence to accept extension (used when extensionStrategy=MinConf)

extensionStrategy

possible values: ConfImprovementAgainstLastConfirmedExtension, ConfImprovementAgainstSeedRule,MinConf

loglevel

logger level from java.util.logging

createHistorySlot

creates a history slot on the resulting qCBARuleModel model, which contains an ordered list of extensions that were created on input rules during the extension process

timeExecution

reports execution time of the extend step

Value

Object of class qCBARuleModel.

Examples

Run this code
# NOT RUN {
allData <- datasets::iris[sample(nrow(datasets::iris)),]
trainFold <- allData[1:100,]
testFold <- allData[101:nrow(datasets::iris),]
rmCBA <- cba(trainFold, classAtt="Species")
rmqCBA <- qcba(cbaRuleModel=rmCBA,datadf=trainFold)
print(rmqCBA@rules)
# }

Run the code above in your browser using DataLab