Learn R Programming

RoughSets (version 1.0-0)

SF.applyDecTable: Apply for obtaining a new decision table

Description

It is used to apply a particular object/model for obtaining a new decision table. The models have been calculated previously by feature selection, instance selection, and discretization.

Usage

SF.applyDecTable(decision.table, object,
    control = list())

Arguments

decision.table
a "DecisionTable" class representing a decision table. See SF.asDecisionTable.
object
a class resulting from feature selection (e.g. FS.reduct.computation), discretization (e.g. D.discretization.RST), and insta
control
a list of other parameters which are indx.reduct representing an index of the chosen decision reduct. It is only considered when we calculate all reducts using FS.all.reducts.co

Value

  • A new decision table. Especially for the new decision table resulting from discretization, we obtain a different representation. Values are expressed in intervals instead of labels. For example, $a_1 = [-Inf, 1.35]$ refers to the value $a_1$ has a value in that range.

Examples

Run this code
#############################################################
## Example 1: The feature selection in RST
## using quickreduct
#############################################################
data(RoughSetData)
decision.table <- RoughSetData$hiring.dt

object.1 <- FS.quickreduct.RST(decision.table)

new.decTable <- SF.applyDecTable(decision.table, object.1)

#############################################################
## Example 2: The feature selection in FRST
## using fuzzy.QR (fuzzy quickreduct)
#############################################################
data(RoughSetData)
decision.table <- RoughSetData$hiring.dt

## fuzzy quickreduct using fuzzy lower approximation
control <- list(decision.attr = c(5), t.implicator = "lukasiewicz",
                type.relation = c("tolerance", "eq.1"), type.aggregation =
                c("t.tnorm", "lukasiewicz"))
object.2 <- FS.quickreduct.FRST(decision.table, type.method = "fuzzy.dependency",
                            type.QR = "fuzzy.QR", control = control)

## generate new decision table
new.decTable <- SF.applyDecTable(decision.table, object.2)

###################################################
## Example 3: The Instance selection by IS.FRPS and
## generate new decision table
###################################################
dt.ex1 <- data.frame(c(0.5, 0.2, 0.3, 0.7, 0.2, 0.2),
                  c(0.1, 0.4, 0.2, 0.8, 0.4, 0.4), c(0, 0, 0, 1, 1, 1))
colnames(dt.ex1) <- c("a1", "a2", "d")
decision.table <- SF.asDecisionTable(dataset = dt.ex1, decision.attr = 3)

## evaluate instances
res.1 <- IS.FRPS.FRST(decision.table, type.alpha = "FRPS.3")

## generate new decision table
new.decTable <- SF.applyDecTable(decision.table, res.1)

#################################################################
## Example 4: Discretization by determining cut values and
## then generate new decision table
#################################################################
dt.ex2 <- data.frame(c(1, 1.2, 1.3, 1.4, 1.4, 1.6, 1.3), c(2, 0.5, 3, 1, 2, 3, 1),
                             c(1, 0, 0, 1, 0, 1, 1))
colnames(dt.ex2) <- c("a", "b", "d")
decision.table <- SF.asDecisionTable(dataset = dt.ex2, decision.attr = 3,
                  indx.nominal = 3)

## get cut values using the local strategy algorithm
cut.values <- D.discretization.RST(decision.table, type.method = "local.disc.matrix")

## generate new decision table
new.decTable <- SF.applyDecTable(decision.table, cut.values)

Run the code above in your browser using DataLab