#############################################
## Example 1: Using simple data set
## Objects must be nominal/symbolic values
## Otherwise, we must use discretization first
#############################################
## Construct decision table as data frame
dt.ex1 <- data.frame(c(1,0,2,1,1,2,2,0), c(0, 1,0, 1,0,2,1,1),
c(2,1,0,0,2,0,1,1), c(2,1,1,2,0,1,1,0), c(0,2,1,2,1,1,2,1))
colnames(dt.ex1) <- c("aa", "bb", "cc", "dd", "ee")
decision.table <- SF.asDecisionTable(dataset = dt.ex1, decision.attr = 5,
indx.nominal = c(1:5))
## In this case, we only consider the second and third attributes.
P <- c(2,3)
####### Perform indiscernibility relation #######
IND <- BC.IND.relation.RST(decision.table, attribute = P)
Run the code above in your browser using DataLab