Learn R Programming

RoughSets (version 1.0-0)

BC.LU.approximation.FRST: The fuzzy lower and upper approximation based on fuzzy rough set theory

Description

This is a function that implements a fundamental concept of FRST which are fuzzy lower and upper approximations. Many options have been considered for determining lower and upper approximations, such as techniques based on implicator and t-norm functions proposed by (A. M. Radzikowska and E. E. Kerre, 2002), etc.

Usage

BC.LU.approximation.FRST(decision.table, IND.condAttr,
    IND.decAttr, type.LU = "implicator.tnorm",
    control = list())

Arguments

decision.table
a "DecisionTable" class representing the decision table. See SF.asDecisionTable.
IND.condAttr
a "IndiscernibilityRelation" class of the conditional attributes which is produced by BC.IND.relation.FRST.
IND.decAttr
a "IndiscernibilityRelation" class of the decision attribute which is produced by BC.IND.relation.FRST.
type.LU
a string representing a chosen method to calculate lower and upper approximation. See the explanation in Section Details.
control
a list of other parameters. In order to understand how to express the control parameter, see the explanation in Section Details. The descriptions of those components and their values is as follows.
  • t.tnorm

Value

  • A class "LowerUpperApproximation" representing fuzzy rough set (fuzzy lower and upper approximation). It contains the following components:
    • fuzzy.lower: a list showing lower approximations classified based on decision concepts for each index of objects. In case the decision attribute is continuous, the result is in a data frame with dimension (number of objects x number of objects) and the value on position$(i,j)$shows the membership of object$i$to the lower approximation of the similarity class of object$j$.
    • fuzzy.upper: a list showing upper approximations classified based on decision concepts for each index of objects. In case the decision attribute is continuous values, the result is in data frame with dimension (number of objects x number of objects) and the value on position$(i,j)$shows the membership of object$i$to the upper approximation of the similarity class of object$j$.
    • type.LU: a string representing the type of lower and upper approximation approach.
    • type.model: a string showing the type of model which is used. In this case, it is"FRST"which means fuzzy rough set theory.

Details

Fuzzy lower and upper approximations as explained in B.Introduction-FuzzyRoughSets are used to define to what extent the set of elements can be classified into a certain class strongly or weakly. This function allows various methods that can be chosen by the parameter type.LU. The following is a list of all type.LU values.
  • "implicator.tnorm": It means implicator/t-norm based model. This strategy was proposed by (A. M. Radzikowska and E. E. Kerre, 2002). The explanation has been given inB.Introduction-FuzzyRoughSets. Other parameters incontrolrelated with this approach aret.tnormandt.implicator. In other words, when we are using"implicator.tnorm"astype.LU, we should consider parameterst.tnormandt.implicator. The possible values of these parameters can be seen in the description of parameters.
  • "vqrs": It means vaquely quantified rough sets. This strategy was proposed by (C. Cornelis et al, 2007). Basically, this concept proposed to replace fuzzy lower and upper approximation based on Radzikowska and Kerre's technique (seeB.Introduction-FuzzyRoughSets) with the following equations, respectively.$(R_{Q_u} \downarrow A)(y) = Q_u(\frac{|R_y \cap A|}{|R_y|})$$(R_{Q_l} \uparrow A)(y) = Q_l(\frac{|R_y \cap A|}{|R_y|})$where the quantifier$Q_u$and$Q_l$represent the termsmostandsome.
  • "owa": It refers to ordered weighted average based fuzzy rough sets. This method was introduced by (C. Cornelis et al, 2010) and computes the approximations by an aggregation process proposed by (R. R. Yager, 1988). The OWA-based lower and upper approximations of$A$under$R$with weight vectors$W_l$and$W_u$are defined as$(R \downarrow W_l A)(y) = OW A_{W_l}\langle I(R(x, y), A(y))\rangle$$(R \uparrow W_u A)(y) = OW A_{W_u}\langle T(R(x, y), A(y))\rangle$In this package, we provide two ways to define the weight vectors as follows:
    • m.owa: Let$m.owa$be$m$and$m \le n$, this model is defined by$W_l = = w_{n+1-i}^l = \frac{2^{m-i}}{2^{m}-1}$for$i = 1,\ldots, m$and$0$for$i = m + 1, \ldots, n$$W_u = = w_i^u = \frac{2^{m - i}}{2^{m} - 1}$for$i = 1, \ldots, m$and$0$for$i = m + 1, \ldots, n$where$n$is the number of data.
    • custom: In this case, users define the own weight vector. It should be noted that the weight vectors$$should satisfy$w_i \in [0, 1]$and their summation is 1.
  • "fvprs": It refers to fuzzy variable precision rough sets (FVPRS) introduced by (S. Y. Zhao et al, 2009). It is a combination between variable precision rough sets (VPRS) and FRST. This function implements the construction of lower and upper approximations as follows.$(R_{\alpha} \downarrow A)(y) = inf_{A(y) \le \alpha} \mathcal{I}(R(x,y), \alpha) \wedge$$inf_{A(y) > \alpha} \mathcal{I}(R(x,y), A(y))$$(R_{\alpha} \uparrow A)(y) = sup_{A(y) \ge N(\alpha)} \mathcal{T}(R(x,y), N(\alpha)) \vee$$sup_{A(y) < N(\alpha)} \mathcal{T}(R(x,y), A(y))$where$\alpha$,$\mathcal{I}$and$\mathcal{T}$are the variable precision parameter, implicator and t-norm operators, respectively.
  • "rfrs": It refers to robust fuzzy rough sets (RFRS) proposed by (Q. Hu et al, 2012). This package provides six types of RFRS which are k-trimmed minimum, k-mean minimum, k-median minimum, k-trimmed maximum, k-mean maximum, and k-median maximum. Basically, these methods are a special case of ordered weighted average (OWA) where they consider the weight vectors as follows.
    • "k.trimmed.min":$w_i^l = 1$for$i = n - k$and$w_i^l = 0$otherwise.
    • "k.mean.min":$w_i^l = 1/k$for$i > n - k$and$w_i^l = 0$otherwise.
    • "k.median.min":$w_i^l = 1$if k odd,$i = n - (k-1)/2$and$w_i^l = 1/2$if k even,$i = n - k/2$and$w_i^l = 0$otherwise.
    • "k.trimmed.max":$w_i^u = 1$for$i = k + 1$and$w_i^u = 0$otherwise.
    • "k.mean.max":$w_i^u = 1/k$for$i < k + 1$and$w_i^u = 0$otherwise.
    • "k.median.max":$w_i^u = 1$if k odd,$i = (k + 1)/2$and$w_i^u = 1/2$if k even,$i = k/2 + 1$or$w_i^u = 0$otherwise.
  • "beta.pfrs": It refers to$\beta$-precision fuzzy rough sets ($\beta$-PFRS) proposed by (J. M. F. Salido and S. Murakami, 2003). This algorithm uses$\beta$-precision quasi-T-norm and$\beta$-precision quasi-T-conorm. The following are the$\beta$-precision versions of fuzzy lower and upper approximations of a fuzzy set$A$in$U$$(R_B \downarrow A)(y) = T_{\beta_{x \in U}} \mathcal{I}(R_B(x,y), A(x))$$(R_B \uparrow A)(y) = S_{\beta_{x \in U}} \mathcal{T}(R_B(x,y), A(x))$where$T_{\beta}$and$S_{\beta}$are$\beta$-precision quasi-T-norm and$\beta$-precision quasi-T-conorm. Given a t-norm$T$, a t-conorm$S$,$\beta \in [0,1]$and$n \in N \setminus {0, 1}$, the corresponding$\beta$-precision quasi-t-norm$T_{\beta}$and$\beta$-precision-T-conorm$S_{\beta}$of order$n$are$[0,1]^n \to [0,1]$mappings such that for all$x = (x_1,...,x_n)$in$[0,1]^n$,$T_{\beta}(x) = T(y_1,...,y_{n-m}$,$S_{\beta}(x) = T(z_1,...,z_{n-p}$,

    where$y_i$is the$i^{th}$greatest element of$x$and$z_i$is the$i^{th}$smallest element of$x$, and$m = max(i \in {0,...,n}|i \le (1-\beta)\sum_{j=1}^{n}x_j)$,$p = max(i \in {0,...,n}|i \le (1-\beta)\sum_{j=1}^{n}(a - x_j))$.

    In this package we useminandmaxfor$T$-norm and$T$-conorm, respectively.

  • "custom": It refers to user-defined lower and upper approximations. An example can be seen in SectionExamples.
The parameter type.LU which is explained above is related with parameter control. In other words, when choosing a specific value of type.LU, we should take into account to set values of related components in control. The components that are considered depend on what kind of lower and upper approximations are used. In other words, we do not need to assign all components for a particular approach but only components related with type.LU. The following is a list showing the components of each approaches.
  • type.LU = "implicator.tnorm":control <- list(t.implicator, t.tnorm)
  • type.LU = "vqrs":control <- list(q.some, q.most, type.aggregation, t.tnorm)
  • type.LU = "owa":control <- list(t.implicator, t.tnorm, m.owa)orcontrol <- list(t.implicator, t.tnorm, w.owa)
  • type.LU = "fvprs":control <- list(t.implicator, t.tnorm, alpha)
  • type.LU = "beta.pfrs":control <- list(t.implicator, t.tnorm, beta.quasi = 0.01)
  • type.LU = "rfrs":control <- list(t.implicator, t.tnorm, type.rfrs, k.rfrs)
  • type.LU = "custom":control <- list(t.implicator, t.tnorm, FUN.lower, FUN.upper)
The description of the components can be seen in the control parameter. In Section Examples, we provide two examples showing different cases which are when we have to handle a nominal decision attribute and a continuous one.

It should be noted that this function depends on BC.IND.relation.FRST which is used to calculate the fuzzy indiscernibility relation as input data. So, it is obvious that before performing this function, users must execute BC.IND.relation.FRST first.

References

A. M. Radzikowska and E. E. Kerre, "A Comparative Study of Fuzzy Rough Sets", Fuzzy Sets and Systems, vol. 126, p. 137 - 156 (2002).

C. Cornelis, M. De Cock, and A. Radzikowska, "Vaguely Quantified Rough Sets", Proceedings of 11th International Conference on Rough Sets, Fuzzy Sets, Data Mining and Granular Computing (RSFDGrC2007), Lecture Notes in Artificial Intelligence 4482, p. 87 - 94 (2007).

C. Cornelis, N. Verbiest, and R. Jensen, "Ordered Weighted Average Based Fuzzy Rough Sets", Proceedings of the 5th International Conference on Rough Sets and Knowledge Technology (RSKT 2010), p. 78 - 85 (2010).

J. M. F. Salido and S. Murakami, "Rough Set Analysis of a General Type of Fuzzy Data Using Transitive Aggregations of Fuzzy Similarity Relations", Fuzzy Sets Syst., vol. 139, p. 635 - 660 (2003).

Q. Hu, L. Zhang, S. An, D. Zhang, and D. Yu, "On Robust Fuzzy Rough Set Models", IEEE Trans. on Fuzzy Systems, vol. 20, no. 4, p. 636 - 651 (2012).

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).

R. R. Yager, "On ordered weighted averaging aggregation operators in multicriteria decision making", IEEE Transactions on Systems, Man, and Cybernetics, vol. 18, p. 183 - 190 (1988).

S. Y. Zhao, E. C. C. Tsang, and D. G. Chen, "The Model of Fuzzy Variable Precision Rough Sets", IEEE Trans. Fuzzy Systems, vol. 17, no. 2, p. 451 - 467 (2009).

See Also

BC.IND.relation.RST, BC.LU.approximation.RST, and BC.positive.reg.FRST

Examples

Run this code
###########################################################
## 1. Example: Decision table contains nominal decision attribute
## we are using the same dataset and indiscernibility
## relation along this example.
###########################################################
dt.ex1 <- 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.ex1) <- c("a", "b", "c", "d")
decision.table <- SF.asDecisionTable(dataset = dt.ex1, decision.attr = 4)

## let us consider the first and second attributes
## only as conditional attributes
condAttr <- c(1, 2)

## let us consider the fourth attribute as decision attribute
decAttr <- c(4)

#### calculate fuzzy indiscernibility relation ####
control.ind <- list(type.aggregation = c("t.tnorm", "lukasiewicz"),
                    type.relation = c("tolerance", "eq.1"))
control.dec <- list(type.aggregation = c("crisp"), type.relation = "crisp")

## fuzzy indiscernibility relation of conditional attribute
IND.condAttr <- BC.IND.relation.FRST(decision.table, attributes = condAttr,
                                     control = control.ind)

## fuzzy indiscernibility relation of decision attribute
IND.decAttr <- BC.IND.relation.FRST(decision.table, attributes = decAttr,
                                     control = control.dec)

#### Calculate fuzzy lower and upper approximation using type.LU : "implicator.tnorm" ####
control <- list(t.implicator = "lukasiewicz", t.tnorm = "lukasiewicz")
FRST.LU <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "implicator.tnorm", control = control)

#### Calculate fuzzy lower and upper approximation using type.LU : "implicator.tnorm"
####	with user-defined t-norm
FUN.tnorm <- function(left.side, right.side) {
               if ((left.side + right.side) > 1)
                   return(min(left.side, right.side))
               else return(0)}
control <- list(t.implicator = "lukasiewicz",  t.tnorm = FUN.tnorm )
FRST.LU.1 <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "implicator.tnorm", control = control)

#### Calculate fuzzy lower and upper approximation using type.LU : "vqrs" ####
control <- list(q.some = c(0.1, 0.6), q.most = c(0.2, 1), t.tnorm = "lukasiewicz")
FRST.VQRS <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "vqrs", control = control)

#### Calculate fuzzy lower and upper approximation using type.LU : "owa" ####
control <- list(t.implicator = "lukasiewicz", t.tnorm = "lukasiewicz", m.owa = 3)
FRST.OWA.1 <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "owa", control = control)

#### Calculate fuzzy lower and upper approximation using type.LU :
#### "owa" with customized function
#### In this case, we are using the same weight vector as
#### previous one with m.owa = 3
control <- list(t.implicator = "lukasiewicz", t.tnorm = "lukasiewicz",
               w.owa =  c(0, 0, 0, 0.14, 0.29, 0.57))
FRST.OWA.2 <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "owa", control = control)

#### Calculate fuzzy lower and upper approximation using type.LU : "fvprs" ####
control <- list(t.implicator = "lukasiewicz", t.tnorm = "lukasiewicz", alpha = 0.05)
FRST.fvprs <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "fvprs", control = control)


#### Calculate fuzzy lower and upper approximation using type.LU : "rfrs" ####
control <- list(t.implicator = "lukasiewicz", t.tnorm = "lukasiewicz",
                type.rfrs = "k.trimmed.min", k.rfrs = 0)
FRST.rfrs <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "rfrs", control = control)

#### Calculate fuzzy lower and upper approximation using type.LU : "beta.pfrs" ####
control <- list(t.implicator = "lukasiewicz", t.tnorm = "lukasiewicz", beta.quasi = 0.05)
FRST.beta.pfrs <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "beta.pfrs", control = control)

#### Calculate fuzzy lower and upper approximation using type.LU : "custom" ####
## In this case, we calculate approximations randomly.
f.lower <- function(x){
        return(min(runif(1, min = 0, max = 1) * x))
}
f.upper <- function(x){
        return(max(runif(1, min = 0, max = 1) * x))
}
control <- list(t.implicator = "lukasiewicz", t.tnorm = "lukasiewicz", FUN.lower = f.lower,
                FUN.upper = f.upper)
FRST.custom <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "custom", control = control)

#### In this case, we use custom function for triangular norm and implicator operator
## For example, let us define our implicator and t-norm operator as follows.
imp.lower <- function(antecedent, consequent){
	                 return(max(1 - antecedent, consequent))
              }
tnorm.upper <- function(x, y){
                return (x * y)
             }
control.custom <- list(t.implicator = imp.lower, t.tnorm = tnorm.upper)
FRST.LU.custom <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "implicator.tnorm", control = control.custom)

###########################################################
## 2. Example: Decision table contains a continuous decision attribute.
## It should be noted that in this example, we are using
## the same dataset and indiscernibility relation.
## We only show one method but for other approaches
## the procedure is analogous to the previous example
###########################################################
## In this case, we are using housing dataset containing 7 objects
data(RoughSetData)
decision.table <- RoughSetData$housing7.dt

## let us consider the first and second conditional attributes only
cond.attributes <- c(1, 2)
dec.attributes <- c(14)
control.ind <- list(type.aggregation = c("t.tnorm", "lukasiewicz"),
               type.relation = c("tolerance", "eq.1"))
IND.condAttr <- BC.IND.relation.FRST(decision.table, attributes = cond.attributes,
                                     control = control.ind)
IND.decAttr <- BC.IND.relation.FRST(decision.table, attributes = dec.attributes,
                                    control = control.ind)

#### Calculate fuzzy lower and upper approximation using type.LU : "implicator.tnorm" ####
control <- list(t.implicator = "lukasiewicz", t.tnorm = "lukasiewicz")
FRST.LU <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "implicator.tnorm", control = control)

Run the code above in your browser using DataLab