BC.IND.relation.FRST: The indiscernibility relation based on fuzzy rough set theory

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/BasicFuzzyRoughSets.R

Description

This is a function used to implement a fundamental concept of FRST which is fuzzy indiscernibility relations. It is used for any fuzzy relations that determine the degree to which two objects are indiscernibility. The detailed description about basic concepts of FRST can be found in B.Introduction-FuzzyRoughSets.

Usage

1
2
BC.IND.relation.FRST(decision.table, attributes = NULL,
  control = list())

Arguments

decision.table

a "DecisionTable" class representing a decision table. See SF.asDecisionTable.

attributes

a numerical vector expressing indexes of subset of attributes to be considered. The default value is NULL which means that all conditional attributes will be considered.

control

a list of other parameters consisting of the following parameters:

  • type.relation: a list containing string values that express the type of the fuzzy relation and its equation. The default value is type.relation = c("tolerance", "eq.1"). See in the Section Details.

  • type.aggregation: a list expressing type of aggregation. The default value is type.aggregation = c("t.tnorm", "lukasiewicz"). See in the Section Details.

Details

Briefly, the indiscernibility relation is a relation that shows a degree of similarity among the objects. For example, R(x_i, x_j) = 0 means the object x_i is completely different from x_j, and otherwise if R(x_i, x_j) = 1, while between those values we consider a degree of similarity. To calculate this relation, several methods have been implemented in this function which are approaches based on fuzzy tolerance, equivalence and T-equivalence relations. The fuzzy tolerance relations proposed by (Jensen and Shen, 2009) include three equations while (Hu, 2004) proposed five T_{cos}-transitive kernel functions as fuzzy T-equivalence relations. The simple algorithm of fuzzy equivalence relation is implemented as well. Furthermore, we facilitate users to define their own equation for similarity relation.

To calculate a particular relation, we should pay attention to several components in the parameter control. The main component in the control parameter is type.relation that defines what kind of approach we are going to use. The detailed explanation about the parameters and their equations is as follows:

Beside the above type.relation, we provide several options of values for the type.aggregation parameter. The following is a description about it.

Furthermore, the use of this function has been illustrated in Section Examples. Finally, this function is important since it is a basic function needed by other functions, such as BC.LU.approximation.FRST and BC.positive.reg.FRST for calculating lower and upper approximation and determining positive regions.

Value

A class "IndiscernibilityRelation" which contains

Author(s)

Lala Septem Riza

References

M. Genton, "Classes of Kernels for Machine Learning: a Statistics Perspective", J. Machine Learning Research, vol. 2, p. 299 - 312 (2001).

H. Naessens, H. De Meyer, and B. De Baets, "Algorithms for the Computation of T-Transitive Closures", IEEE Trans. on Fuzzy Systems, vol. 10, No. 4, p. 541 - 551 (2002).

R. Jensen and Q. Shen, "New Approaches to Fuzzy-Rough Feature Selection", IEEE Trans. on Fuzzy Systems, vol. 19, no. 4, p. 824 - 838 (2009).

Q. Hu, D. Yu, W. Pedrycz, and D. Chen, "Kernelized Fuzzy Rough Sets and Their Applications", IEEE Trans. Knowledge Data Eng., vol. 23, no. 11, p. 1649 - 1471 (2011).

See Also

BC.LU.approximation.FRST, BC.IND.relation.RST, BC.LU.approximation.RST,

and BC.positive.reg.FRST

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
###########################################################
## Example 1: Dataset containing nominal values for 
## all attributes.
###########################################################
## Decision table is represented 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.
attributes <- c(2, 3)

## calculate fuzzy indiscernibility relation ##
## in this case, we are using "crisp" as a type of relation and type of aggregation
control.ind <- list(type.relation = c("crisp"), type.aggregation = c("crisp"))
IND <- BC.IND.relation.FRST(decision.table, attributes = attributes, control = control.ind)

###########################################################
## Example 2: Dataset containing real-valued attributes
###########################################################
dt.ex2 <- data.frame(c(-0.4, -0.4, -0.3, 0.3, 0.2, 0.2), 
                     c(-0.3, 0.2, -0.4, -0.3, -0.3, 0),
			        c(-0.5, -0.1, -0.3, 0, 0, 0),
			        c("no", "yes", "no", "yes", "yes", "no"))
colnames(dt.ex2) <- c("a", "b", "c", "d")
decision.table <- SF.asDecisionTable(dataset = dt.ex2, decision.attr = 4)

## in this case, we only consider the first and second attributes
attributes <- c(1, 2)

## Calculate fuzzy indiscernibility relation 
## in this case, we choose "tolerance" relation and "eq.1" as similarity equation
## and "lukasiewicz" as t-norm of type of aggregation
control.1 <- list(type.aggregation = c("t.tnorm", "lukasiewicz"), 
                    type.relation = c("tolerance", "eq.1"))
IND.1 <- BC.IND.relation.FRST(decision.table, attributes = attributes, 
                              control = control.1) 

## Calculate fuzzy indiscernibility relation: transitive.kernel
control.2 <- list(type.aggregation = c("t.tnorm", "t.cos"), 
                    type.relation = c("transitive.kernel", "gaussian", 0.2))
IND.2 <- BC.IND.relation.FRST(decision.table, attributes = attributes, 
                              control = control.2) 

## Calculate fuzzy indiscernibility relation: kernel.frst 
control.3 <- list(type.relation = c("kernel.frst", "gaussian.kernel", 0.2))
IND.3 <- BC.IND.relation.FRST(decision.table, attributes = attributes, 
                              control = control.3) 

## calculate fuzzy transitive closure
control.4 <- list(type.aggregation = c("t.tnorm", "lukasiewicz"), 
                    type.relation = c("transitive.closure", "eq.1"))
IND.4 <- BC.IND.relation.FRST(decision.table, attributes = attributes, 
                              control = control.4) 

## Calculate fuzzy indiscernibility relation: using user-defined relation
## The customized function should have three arguments which are : decision.table 
## and object x, and y.
## This following example shows that we have an equation for similarity equation: 
## 1 - abs(x - y) where x and y are two objects that will be compared.
## In this case, we do not consider decision.table in calculation.
FUN.relation <- function(decision.table, x, y) {
           return(1 - (abs(x - y)))
       }
control.5 <- list(type.aggregation = c("t.tnorm", "lukasiewicz"), 
                     type.relation = c("custom", FUN.relation))
IND.5 <- BC.IND.relation.FRST(decision.table, attributes = attributes, 
                              control = control.5) 

## In this case, we calculate aggregation as average of all objects 
## by executing the Reduce function
FUN.average <- function(data){
  	 return(Reduce("+", data)/length(data))
}
control.6 <- list(type.aggregation = c("custom", FUN.average), 
                     type.relation = c("tolerance", "eq.1"))
IND.6 <- BC.IND.relation.FRST(decision.table, attributes = attributes, 
                              control = control.6)

## using user-defined tnorms 
FUN.tnorm <- function(left.side, right.side) {
               if ((left.side + right.side) > 1)
                   return(min(left.side, right.side))
               else return(0)}
control.7 <- list(type.aggregation = c("t.tnorm", FUN.tnorm), 
                    type.relation = c("tolerance", "eq.1"))
IND.7 <- BC.IND.relation.FRST(decision.table, attributes = attributes, 
                              control = control.7) 

## Calculate fuzzy indiscernibility relation: kernel fuzzy rough set 
control.8 <- list(type.relation = c("kernel.frst", "gaussian.kernel", 0.2))
IND.8 <- BC.IND.relation.FRST(decision.table, attributes = attributes, 
                              control = control.8) 						   
##################################################################
## Example 3: Dataset containing continuous and nominal attributes
## Note. we only consider type.relation = c("tolerance", "eq.1")
## but other approaches have the same way.
##################################################################
data(RoughSetData)
decision.table <- RoughSetData$housing7.dt 

## in this case, we only consider the attribute: 1, 2, 3, 4 
attributes <- c(1,2,3,4)

## Calculate fuzzy indiscernibility relation
control.9 <- list(type.aggregation = c("t.tnorm", "lukasiewicz"),
                    type.relation = c("tolerance", "eq.1"))
IND.9 <- BC.IND.relation.FRST(decision.table, attributes = attributes, control = control.9) 

RoughSets documentation built on Dec. 16, 2019, 1:37 a.m.