RoughSets (version 1.3-8)

RoughSets-package: Getting started with the RoughSets package

Description

This part contains global explanations about the implementation and use of the RoughSets package. The package RoughSets attempts to provide a complete tool to model and analyze information systems based on rough set theory (RST) and fuzzy rough set theory (FRST). From fundamental point of view, this package allows to construct rough sets by defining lower and upper approximations. Furthermore, recent methods for tackling common tasks in data mining, such as data preprocessing (e.g., discretization, feature selection, missing value completion, and instance selection), rule induction, and prediction classes or decision values of new datasets are available as well.

Arguments

Introduction to Rough Set Theory

This part attempts to introduce rough set theory (RST) and its application to data analysis. While the classical RST proposed by Pawlak in 1982 is explained in detail in this section, some recent advancements will be treated in the documentation of the related functions.

In RST, a data set is represented as a table called an information system \(\mathcal{A} = (U, A)\), where \(U\) is a non-empty set of finite objects known as the universe of discourse (note: it refers to all instances/rows in datasets) and \(A\) is a non-empty finite set of attributes, such that \(a : U \to V_{a}\) for every \(a \in A\). The set \(V_{a}\) is the set of values that attribute \(a\) may take. Information systems that involve a decision attribute, containing classes for each object, are called decision systems or decision tables. More formally, it is a pair \(\mathcal{A} = (U, A \cup \{d\})\), where \(d \notin A\) is the decision attribute. The elements of \(A\) are called conditional attributes. The information system representing all data in a particular system may contain redundant parts. It could happen because there are the same or indiscernible objects or some superfluous attributes. The indiscernibility relation is a binary relation showing the relation between two objects. This relation is an equivalence relation. Let \(\mathcal{A} = (U, A)\) be an information system, then for any \(B \subseteq A\) there is an equivalence relation \(R_B(x,y)\):

\(R_B(x,y)= \{(x,y) \in U^2 | \forall a \in B, a(x) = a(y)\}\)

If \((x,y) \in R_B(x,y)\), then \(x\) and \(y\) are indiscernible by attributes from \(B\). The equivalence classes of the \(B\)-indiscernibility relation are denoted \([x]_{B}\). The indiscernibility relation will be further used to define basic concepts of rough set theory which are lower and upper approximations.

Let \(B \subseteq A\) and \(X \subseteq U\), \(X\) can be approximated using the information contained within \(B\) by constructing the \(B\)-lower and \(B\)-upper approximations of \(X\):

\(R_B \downarrow X = \{ x \in U | [x]_{B} \subseteq X \}\)

\(R_B \uparrow X = \{ x \in U | [x]_{B} \cap X \not= \emptyset \}\)

The tuple \(\langle R_B \downarrow X, R_B \uparrow X \rangle\) is called a rough set. The objects in \(R_B \downarrow X\) mean that they can be with certainty classified as members of \(X\) on the basis of knowledge in \(B\), while the objects in \(R_B \uparrow X\) can be only classified as possible members of \(X\) on the basis of knowledge in \(B\).

In a decision system, for \(X\) we use decision concepts (equivalence classes of decision attribute) \([x]_d\). We can define \(B\)-lower and \(B\)-upper approximations as follows.

\(R_B \downarrow [x]_d = \{ x \in U | [x]_{B} \subseteq [x]_d \}\)

\(R_B \uparrow [x]_d = \{ x \in U | [x]_{B} \cap [x]_d \not= \emptyset \}\)

The positive, negative and boundary of \(B\) regions can be defined as:

\(POS_{B} = \bigcup_{x \in U } R_B \downarrow [x]_d\)

The boundary region, \(BND_{B}\), is the set of objects that can possibly, but not certainly, be classified.

\(BND_{B} = \bigcup_{x \in U} R_B \uparrow [x]_d - \bigcup_{x \in U} R_B \downarrow [x]_d\)

Furthermore, we can calculate the degree of dependency of the decision on a set of attributes. The decision attribute \(d\) depends totally on a set of attributes \(B\), denoted \(B \Rightarrow d\), if all attribute values from \(d\) are uniquely determined by values of attributes from \(B\). It can be defined as follows. For \(B \subseteq A\), it is said that \(d\) depends on \(B\) in a degree of dependency \(\gamma_{B} = \frac{|POS_{B}|}{|U|}\).

A decision reduct is a set \(B \subseteq A\) such that \(\gamma_{B} = \gamma_{A}\) and \(\gamma_{B'} < \gamma_{B}\) for every \(B' \subset B\). One algorithm to determine all reducts is by constructing the decision-relative discernibility matrix. The discernibility matrix \(M(\mathcal{A})\) is an \(n \times n\) matrix \((c_{ij})\) where

\(c_{ij} = \{a \in A: a(x_i) \neq a(x_j) \}\) if \(d(x_i) \neq d(x_j)\) and

\(c_{ij} = \oslash\) otherwise

The discernibility function \(f_{\mathcal{A}}\) for a decision system \(\mathcal{A}\) is a boolean function of \(m\) boolean variables \(\bar{a}_1, \ldots, \bar{a}_m\) corresponding to the attributes \(a_1, \ldots, a_m\) respectively, and defined by

\(f_{\mathcal{A}}(\bar{a_1}, \ldots, \bar{a_m}) = \wedge \{\vee \bar{c}_{ij}: 1 \le j < i \le n, c_{ij} \neq \oslash \}\)

where \(\bar{c}_{ij}= \{ \bar{a}: a \in c_{ij}\}\). The decision reducts of \(A\) are then the prime implicants of the function \(f_{\mathcal{A}}\). The complete explanation of the algorithm can be seen in (Skowron and Rauszer, 1992).

The implementations of the RST concepts can be seen in BC.IND.relation.RST,

BC.LU.approximation.RST, BC.positive.reg.RST, and

BC.discernibility.mat.RST.

Introduction to Fuzzy Rough Set Theory

This part introduces briefly fuzzy rough set theory (FRST) and its application to data analysis. Since recently there are a lot of FRST variants that have been proposed by researchers, in this introduction, we only provide some basic concepts of FRST based on (Radzikowska and Kerre, 2002).

Just like in RST (see Introduction-RoughSets), a data set is represented as a table called an information system \(\mathcal{A} = (U, A)\), where \(U\) is a non-empty set of finite objects as the universe of discourse (note: it refers to all instances/experiments/rows in datasets) and \(A\) is a non-empty finite set of attributes, such that \(a : U \to V_{a}\) for every \(a \in A\). The set \(V_{a}\) is the set of values that attribute \(a\) may take. Information systems that involve a decision attribute, containing classes or decision values of each objects, are called decision systems (or said as decision tables). More formally, it is a pair \(\mathcal{A} = (U, A \cup \{d\})\), where \(d \notin A\) is the decision attribute. The elements of \(A\) are called conditional attributes. However, different from RST, FRST has several ways to express indiscernibility.

Fuzzy indiscernibility relation (FIR) is used for any fuzzy relation that determines the degree to which two objects are indiscernible. We consider some special cases of FIR.

  • fuzzy tolerance relation: this relation has properties which are reflexive and symmetric where

    reflexive: \(R(x,x) = 1\)

    symmetric: \(R(x,y) = R(y,x)\)

  • similarity relation (also called fuzzy equivalence relation): this relation has properties not only reflexive and symmetric but also transitive defined as

    \(min(R(x,y), R(y,z)) \le R(x,z)\)

  • \(\mathcal{T}\)-similarity relation (also called fuzzy \(\mathcal{T}\)-equivalence relation): this relation is a fuzzy tolerance relation that is also \(\mathcal{T}\)-transitive.

    \(\mathcal{T}(R(x,y), R(y,z)) \le R(x,z)\), for a given triangular norm \(\mathcal{T}\).

The following equations are the tolerance relations on a quantitative attribute \(a\), \(R_a\), proposed by (Jensen and Shen, 2009).

  • eq.1: \(R_a(x,y) = 1 - \frac{|a(x) - a(y)|}{|a_{max} - a_{min}|}\)

  • eq.2: \(R_a(x,y) = exp(-\frac{(a(x) - a(y))^2}{2 \sigma_a^2})\)

  • eq.3: \(R_a(x,y) = max(min(\frac{a(y) - a(x) + \sigma_a}{\sigma_a}, \frac{a(x) - a(y) + \sigma_a}{\sigma_a}), 0)\)

where \(\sigma_{a}^2\) is the variance of feature \(a\) and \(a_{min}\) and \(a_{max}\) are the minimal and maximal values of data supplied by user. Additionally, other relations have been implemented in BC.IND.relation.FRST

For a qualitative (i.e., nominal) attribute \(a\), the classical manner of discerning objects is used, i.e., \(R_a(x,y) = 1\) if \(a(x) = a(y)\) and \(R_a(x,y) = 0\), otherwise. We can then define, for any subset \(B\) of \(A\), the fuzzy \(B\)-indiscernibility relation by

\(R_B(x,y) = \mathcal{T}(R_a(x,y))\),

where \(\mathcal{T}\) is a t-norm operator, for instance minimum, product and Lukasiewicz t-norm. In general, \(\mathcal{T}\) can be replaced by any aggregation operator, like e.g., the average.

In the context of FRST, according to (Radzikowska and Kerre, 2002) lower and upper approximation are generalized by means of an implicator \(\mathcal{I}\) and a t-norm \(\mathcal{T}\). The following are the fuzzy \(B\)-lower and \(B\)-upper approximations of a fuzzy set \(A\) in \(U\)

\((R_B \downarrow A)(y) = inf_{x \in U} \mathcal{I}(R_B(x,y), A(x))\)

\((R_B \uparrow A)(y) = sup_{x \in U} \mathcal{T}(R_B(x,y), A(x))\)

The underlying meaning is that \(R_B \downarrow A\) is the set of elements necessarily satisfying the concept (strong membership), while \(R_B \uparrow A\) is the set of elements possibly belonging to the concept (weak membership). Many other ways to define the approximations can be found in BC.LU.approximation.FRST. Mainly, these were designed to deal with noise in the data and to make the approximations more robust.

Based on fuzzy \(B\)-indiscernibility relations, we define the fuzzy \(B\)-positive region by, for \(y \in X\),

\(POS_B(y) = (\cup_{x \in U} R_B \downarrow R_dx)(y)\)

We can define the degree of dependency of \(d\) on \(B\), \(\gamma_{B}\) by

\(\gamma_{B} = \frac{|POS_{B}|}{|U|} = \frac{\sum_{x \in U} POS_{B}(x)}{|U|}\)

A decision reduct is a set \(B \subseteq A\) such that \(\gamma_{B} = \gamma_{A}\) and \(\gamma_{B'} = \gamma_{B}\) for every \(B' \subset B\).

As we know from rough set concepts (See Introduction-RoughSets), we are able to calculate the decision reducts by constructing the decision-relative discernibility matrix. Based on (Tsang et al, 2008), the discernibility matrix can be defined as follows. The discernibility matrix is an \(n \times n\) matrix \((c_{ij})\) where for \(i,j = 1, \ldots, n\)

1) \(c_{ij}= \{a \in A : 1 - R_{a}(x_i, x_j) \ge \lambda_i\}\) if \(\lambda_j < \lambda_i\).

2) \(c_{ij}={\oslash}\), otherwise.

with \(\lambda_i = (R_A \downarrow R_{d}x_{i})(x_i)\) and \(\lambda_j = (R_A \downarrow R_{d}x_{j})(x_{j})\)

Other approaches of discernibility matrix can be read at BC.discernibility.mat.FRST.

The other implementations of the FRST concepts can be seen at BC.IND.relation.FRST,

BC.LU.approximation.FRST, and BC.positive.reg.FRST.

Author

Lala Septem Riza lala.s.riza@decsai.ugr.es,

Andrzej Janusz andrzejanusz@gmail.com,

Chris Cornelis chriscornelis@decsai.ugr.es,

Francisco Herrera herrera@decsai.ugr.es,

Dominik Slezak slezak@mimuw.edu.pl,

and Jose Manuel Benitez j.m.benitez@decsai.ugr.es

DiCITS Lab, SCI2S group, CITIC-UGR, DECSAI, University of Granada,

https://sci2s.ugr.es

Institute of Mathematics, University of Warsaw.

Details

There are two main parts considered in this package which are RST and FRST. RST was introduced by (Pawlak, 1982; Pawlak, 1991) which provides sophisticated mathematical tools to model and analyze information systems that involve uncertainty and imprecision. By employing indiscernibility relation among objects, RST does not require additional parameters to extract information. The detailed explanation about fundamental concepts of RST can be read in Section Introduction-RoughSets. Secondly, FRST, an extension of RST, was introduced by (Dubois and Prade, 1990) as a combination between fuzzy sets proposed by (Zadeh, 1965) and RST. This concept allows to analyze continuous attributes without performing discretization on data first. Basic concepts of FRST can be seen in Introduction-FuzzyRoughSets.

Based on the above concepts, many methods have been proposed and applied for dealing with several different domains. In order to solve the problems, methods employ the indiscernibility relation and lower and upper approximation concepts. All methods that have been implemented in this package will be explained by grouping based on their domains. The following is a list of domains considered in this package:

  • Basic concepts: This part, we can divide into four different tasks which are indiscernibility relation, lower and upper approximations, positive region and discernibility matrix. All of those tasks have been explained briefly in Section Introduction-RoughSets and

    Introduction-FuzzyRoughSets.

  • Discretization: It is used to convert real-valued attributes into nominal/symbolic ones in an information system. In RST point of view, this task attempts to maintain the discernibility between objects.

  • Feature selection: It is a process for finding a subset of features which have the same quality as the complete feature set. In other words, its purpose is to select the significant features and eliminate the dispensible ones. It is a useful and necessary process when we are facing datasets containing large numbers of features. From RST and FRST perspective, feature selection refers to searching superreducts and reducts. The detailed information about reducts can be read in Introduction-RoughSets and Introduction-FuzzyRoughSets.

  • Instance selection: This process is aimed to remove noisy, superfluous, or inconsistent instances from training datasets but retain consistent ones. In other words, good accuracy of classification is achieved by removing instances which do not give positive contributions.

  • Prediction/classification: This task is used to predict decision values of a new dataset (test data). We consider implementing some methods to perform this task, such as fuzzy-rough nearest neighbor approaches, etc.

  • Rule induction: This task refers to generate IF - THEN rules. The rule represents knowledge which is contained in a dataset. One advantage of building rules is that naturally the model is easy to interpret. Then, predicted values over new datasets can be determined by considering the rules.

As we mentioned before, we have embedded many well-known algorithms or techniques for handling the above domains. The algorithms were considered since experimentally it has been proven that they were able to tackle complex tasks. They are implemented as functions that were organized to work with the same data structures. So, users can perform various approaches for a particular task easily and then compare their results. In order to be recognized quickly, generally we have chosen the names of the functions with some conventions. The names contain three parts which are prefix, suffix, and middle that are separated by a point. The following is a description of each part.

  • prefix: There are some different prefixes for names of functions expressing a kind of task to be performed. The function names with prefix BC refer to basic concepts which means that the functions are created for implementing the basic concepts of RST and FRST. While prefix D refers to discretization, FS, IS, RI, MV, and C refer to feature selection, instance selection, rule induction, missing value completion, and classifier based on nearest neighbor domains. Furthermore, SF and X mean that functions are used as supporting functions which are not related directly with RST and FRST and auxiliary functions which are called as a parameter.

  • suffix: It is located at the end of names. There are two types available: RST and FRST. RST represents rough set theory while FRST shows that the function is applied to fuzzy rough set theory. Additionally, some functions that do not have RST or FRST suffix are used for both theories.

  • middle: All other words in the middle of the names are used to express the actual name of a particular method/algorithm or functionality. In this case, it could consist of more than one word separated by points.

For instance, the function BC.IND.relation.RST is used to calculate the indiscernibility relation which is one of the basic concepts of RST. Other functions that have names not based on the above rules are S3 functions e.g., summary and predict which are used to summarize objects and predict new data, respectively.

The following description explains domains and their algorithms implemented in the package:

  1. The implementations of RST: This part outlines some considered algorihtms/methods based on RST. The approaches can be classified based on their tasks as follows:

    1. The basic concepts: The following is a list showing tasks and their implementations as functions.

      • Indiscernibility relation: It is a relation determining whether two objects are indiscernible by some attributes. It is implemented in BC.IND.relation.RST.

      • Lower and upper approximations: These approximations show whether objects can be classified with certainty or not. It is implemented in BC.LU.approximation.RST.

      • Positive region: It is used to determine objects that are included in positive region and the degree of dependency. It is implemented in BC.positive.reg.RST.

      • Discernibility matrix: It is used to create a discernibility matrix showing attributes that discern each pair of objects. It is implemented in BC.discernibility.mat.RST.

    2. Discretization: There are a few methods included in the package:

      • D.global.discernibility.heuristic.RST: It implements the global discernibility algorithm which is computing globally semi-optimal cuts using the maximum discernibility heuristic.

      • D.discretize.quantiles.RST: It is a function used for computing cuts of the "quantile-based" discretization into \(n\) intervals.

      • D.discretize.equal.intervals.RST: It is a function used for computing cuts of the "equal interval size" discretization into \(n\) intervals.

      The output of these functions is a list of cut values which are the values for converting real to nominal values. So, in order to generate a new decision table according to the cut values, we need to call SF.applyDecTable. Additionally, we have implemented D.discretization.RST as a wrapper function collecting all methods considered to perform discretization tasks.

    3. Feature selection: According to its output, it can be classified into the following groups:

      • Feature subset: It refers to a superreduct which is not necessarily minimal. In other words, the methods in this group might generate just a subset of attributes.

        • QuickReduct algorithm: It has been implemented in FS.quickreduct.RST.

        • Superreduct generation: It is based on some criteria: entropy, gini index, discernibility measure, size of positive region.

          It is implemented in FS.greedy.heuristic.superreduct.RST.

        Furthermore, we provide a wrapper function FS.feature.subset.computation in order to give a user interface for many methods of RST and FRST that are included in this group.

      • Reduct: The following are methods that produce a single decision reduct:

        • Reduct generation based on criteria: It is based on different criteria which are entropy, gini index, discernibility measure, size of positive region. It has been implemented in FS.greedy.heuristic.reduct.RST.

        • Permutation reduct: It is based on a permutation schema over all attributes. It has been implemented in FS.permutation.heuristic.reduct.RST.

        Furthermore, we provide a wrapper function FS.reduct.computation in order to give a user interface toward many methods of RST and FRST that are included in this group.

      • All reducts: In order to generate all reducts, we execute FS.all.reducts.computation. However, before doing that, we need to call BC.discernibility.mat.RST for constructing a decision-relative discernibility matrix

      It should be noted that the outputs of the functions are decision reducts. So, for generating a new decision table according to the decision reduct, we need to call SF.applyDecTable.

    4. Rule induction: We provide several functions used to generate rules, as follows:

      • The function RI.indiscernibilityBasedRules.RST: This function requires the output of the feature selection functions.

      • The function RI.CN2Rules.RST: It is a rule induction method based on the CN2 algorithm.

      • The function RI.LEM2Rules.RST: It implements a rule induction method based on the LEM2 algorithm.

      • The function RI.AQRules.RST: It is a rule induction based on the AQ-style algorithm.

      After obtaining the rules, we execute predict.RuleSetRST considering our rules and given newdata/testing data to obtain predicted values/classes.

  2. The implementations of FRST: As in the RST part, this part contains several algorithms that can be classified into several groups based on their purpose. The following is a description of all methods that have been implemented in functions:

    1. Basic concepts: The following is a list showing tasks and their implementations:

      • Indiscernibility relations: they are fuzzy relations determining to which degree two objects are similar. This package provides several types of relations which are implemented in a single function called BC.IND.relation.FRST. We consider several types of relations e.g., fuzzy equivalence, tolerance, and \(T\)-similarity relations. These relations can be chosen by assigning type.relation. Additionally, in this function, we provide several options to calculate aggregation e.g., triangular norm operators (e.g., "lukasiewicz", "min", etc) and user-defined operators.

      • Lower and upper approximations: These approximations show to what extent objects can be classified with certainty or not. This task has been implemented in

        BC.LU.approximation.FRST. There are many approaches available in this package that can be selected by assigning the parameter type.LU. The considered methods are implication/t-norm, \(\beta\)-precision fuzzy rough sets (\(\beta\)-PFRS), vaguely quantified rough sets (VQRS), fuzzy variable precision rough sets (FVPRS), ordered weighted average (OWA), soft fuzzy rough sets (SFRS), and robust fuzzy rough sets (RFRS). Furthermore, we provide a facility, which is "custom", where users can create their own approximations by defining functions to calculate lower and upper approximations. Many options to calculate implicator and triangular norm are also available.

      • Positive region: It is used to determine the membership degree of each object to the positive region and the degree of dependency. It is implemented in BC.positive.reg.FRST.

      • Discernibility matrix: It is used to construct the decision-relative discernibility matrix. There are some approaches to construct the matrix, e.g., based on standard approach, Gaussian reduction, alpha reduction, and minimal element in discernibility matrix. They have been implemented in BC.discernibility.mat.FRST.

    2. Feature selection: According to the output of functions, we may divide them into three groups: those that produce a superreduct, a set of reducts, or a single reduct. The following is a description of functions based on their types:

      • Feature subset: It refers to methods which produce a superreduct which is not necessarily a reduct. In other words methods in this group might generate just a subset of attributes. The following is a complete list of methods considered in this package:

        • positive region based algorithms: It refers to positive regions, as a way to evaluate attributes to be selected. They are implemented in FS.quickreduct.FRST. Furthermore, we provide several different measures based on the positive region in this function. All methods included in this part employ the QuickReduct algorithm to obtain selected features. In order to choose a particular algorithm, we need to assign parameter type.method in FS.quickreduct.FRST.

        • boundary region based algorithm: This algorithm is based on the membership degree to the fuzzy boundary region. This algorithm has been implemented in FS.quickreduct.FRST.

        Furthermore, we provide a wrapper function FS.feature.subset.computation in order to give a user interface for many methods of RST and FRST.

      • Reduct: It refers to a method that produces a single decision reduct. We provide one algorithm which is the near-optimal reduction proposed by Zhao et al. It is implemented in FS.nearOpt.fvprs.FRST. Furthermore, we provide a wrapper function FS.reduct.computation in order to provide a user interface toward many methods of RST and FRST.

      • All reducts: In order to get all decision reducts, we execute FS.all.reducts.computation. However, before doing that, we firstly execute the BC.discernibility.mat.FRST function for constructing a decision-relative discernibility matrix.

      The output of the above methods is a class containing a decision reduct/feature subset and other descriptions. For generating a new decision table according to the decision reduct, we provide the function SF.applyDecTable.

    3. Rule induction: It is a task used to generate rules representing knowledge of a decision table. Commonly, this process is called learning phase in machine learning. The following methods are considered to generate rules:

      • RI.hybridFS.FRST: It combines fuzzy-rough rule induction and feature selection.

      • RI.GFRS.FRST: It refers to rule induction based on generalized fuzzy rough sets (GFRS).

      After generating rules, we can use them to predict decision values/classes of new data by executing the S3 function predict.RuleSetFRST.

    4. Instance selection: The following functions select instances to improve accuracy by removing noisy, superfluous or inconsistent ones from training datasets.

      • IS.FRIS.FRST: It refers to the fuzzy rough instance selection (FRIS). It evaluates the degree of membership to the positive region of each instance. If an instance's membership degree is less than the threshold, then the instance can be removed.

      • IS.FRPS.FRST: It refers to the fuzzy-rough prototype selection (FRPS). It employs prototype selection (PS) to improve the accuracy of the $k$-nearest neighbor (kNN) method.

      We provide the function SF.applyDecTable that is used to generate a new decision table according to the output of instance selection functions.

    5. Fuzzy-rough nearest neighbors: This part provides methods based on nearest neighbors for predicting decision values/classes of new datasets. In other words, by supplying a decision table as training data we can predict decision values of new data at the same time. We have considered the following methods:

      • C.FRNN.FRST: It refers to the fuzzy-rough nearest neighbors based on Jensen and Cornelis' technique.

      • C.FRNN.O.FRST: It refers to the fuzzy-rough ownership nearest neighbor algorithm based on Sarkar's method.

      • C.POSNN.FRST: The positive region based fuzzy-rough nearest neighbor algorithm based on Verbiest et al's technique.

Furthermore, we provide an additional feature which is missing value completion. Even though algorithms, included in this feature, are not based on RST and FRST, they will be usefull to do data analysis. The following is a list of functions implemented for handling missing values in the data preprocessing step:

  • MV.deletionCases: it refers to the approach deleting instances.

  • MV.mostCommonValResConcept: it refers to the approach based on the most common value or mean of an attribute restricted to a concept.

  • MV.mostCommonVal: it refers to the approach replacing missing attribute values by the attribute mean or common values.

  • MV.globalClosestFit: it refers to the approach based on the global closest fit approach.

  • MV.conceptClosestFit: it refers to the approach based on the concept closest fit approach.

Additionally, we provide a wrapper function which is MV.missingValueCompletion in order to give a user interface for the methods.

To get started with the package, the user can have a look at the examples included in the documentation on each function. Additionally, to show general usage of the package briefly, we also provide some examples showing general usage in this section.

If you have problems using the package, find a bug, or have suggestions, please contact the package maintainer by email, instead of writing to the general R lists or to other internet forums and mailing lists.

There are many demos that ship with the package. To get a list of them, type:

demo()

Then, to start a demo, type demo(<demo_name_here>). All the demos are presented as R scripts in the package sources in the "demo" subdirectory.

Currently, there are the following demos available:

  • Basic concepts of RST and FRST:

    demo(BasicConcept.RST), demo(BasicConcept.FRST),

    demo(DiscernibilityMatrix.RST), demo(DiscernibilityMatrix.FRST).

  • Discretization based on RST:

    demo(D.local.discernibility.matrix.RST), demo(D.max.discernibility.matrix.RST),

    demo(D.global.discernibility.heuristic.RST), demo(D.discretize.quantiles.RST),

    demo(D.discretize.equal.intervals.RST).

  • Feature selection based on RST:

    demo(FS.permutation.heuristic.reduct.RST), demo(FS.quickreduct.RST),

    demo(FS.greedy.heuristic.reduct.RST), demo(FS.greedy.heuristic.reduct.RST).

  • Feature selection based on FRST:

    demo(FS.QuickReduct.FRST.Ex1), demo(FS.QuickReduct.FRST.Ex2),

    demo(FS.QuickReduct.FRST.Ex3), demo(FS.QuickReduct.FRST.Ex4),

    demo(FS.QuickReduct.FRST.Ex5), demo(FS.nearOpt.fvprs.FRST).

  • Instance selection based on FRST:

    demo(IS.FRIS.FRST), demo(IS.FRPS.FRST)

  • Classification using the Iris dataset:

    demo(FRNN.O.iris), demo(POSNN.iris), demo(FRNN.iris).

  • Rule induction based on RST:

    demo(RI.indiscernibilityBasedRules.RST).

  • Rule induction based on FRST:

    demo(RI.classification.FRST), demo(RI.regression.FRST).

  • Missing value completion: demo(MV.simpleData).

Some decision tables have been embedded in this package which can be seen in RoughSetData.

References

D. Dubois and H. Prade, "Rough Fuzzy Sets and Fuzzy Rough Sets", International Journal of General Systems, vol. 17, p. 91 - 209 (1990).

General references

L.A. Zadeh, "Fuzzy Sets", Information and Control, vol. 8, p. 338 - 353 (1965).

Z. Pawlak, "Rough Sets", International Journal of Computer and Information System, vol. 11, no. 5, p. 341 - 356 (1982).

Z. Pawlak, "Rough Sets: Theoretical Aspects of Reasoning About Data, System Theory, Knowledge Engineering and Problem Solving", vol. 9, Kluwer Academic Publishers, Dordrecht, Netherlands (1991).

Introduction to Rough Set Theory references

A. Skowron and C. Rauszer, "The Discernibility Matrices and Functions in Information Systems", in: R. Slowinski (Ed.), Intelligent Decision Support: Handbook of Applications and Advances of Rough Sets Theory, Kluwer Academic Publishers, Dordrecht, Netherland, p. 331 - 362 (1992).

Z. Pawlak, "Rough Sets", International Journal of Computer and Information System, vol. 11, no.5, p. 341 - 356 (1982).

Z. Pawlak, "Rough Sets: Theoretical Aspects of Reasoning about Data, System Theory, Knowledge Engineering and Problem Solving", vol. 9, Kluwer Academic Publishers, Dordrecht, Netherlands (1991).

Introduction to Fuzzy Rough Set Theory 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).

D. Dubois and H. Prade, "Rough Fuzzy Sets and Fuzzy Rough Sets", International Journal of General Systems, vol. 17, p. 91 - 209 (1990).

E. C. C. Tsang, D. G. Chen, D. S. Yeung, X. Z. Wang, and J. W. T. Lee, "Attributes Reduction Using Fuzzy Rough Sets", IEEE Trans. Fuzzy Syst., vol. 16, no. 5, p. 1130 - 1141 (2008).

L. A. Zadeh, "Fuzzy Sets", Information and Control, vol. 8, p. 338 - 353 (1965).

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

Z. Pawlak, "Rough Sets", International Journal of Computer and Information Sciences, vol. 11, no. 5, p. 341 - 356 (1982).

Examples

Run this code
##############################################################
## A.1 Example: Basic concepts of rough set theory
##############################################################
## Using hiring data set, see RoughSetData
data(RoughSetData)
decision.table <- RoughSetData$hiring.dt

## define considered attributes which are first, second, and
## third attributes
attr.P <- c(1,2,3)

## compute indiscernibility relation
IND <- BC.IND.relation.RST(decision.table, feature.set = attr.P)

## compute lower and upper approximations
roughset <- BC.LU.approximation.RST(decision.table, IND)

## Determine regions
region.RST <- BC.positive.reg.RST(decision.table, roughset)

## The decision-relative discernibility matrix and reduct
disc.mat <- BC.discernibility.mat.RST(decision.table, range.object = NULL)

##############################################################
## A.2 Example: Basic concepts of fuzzy rough set theory
##############################################################
## Using pima7 data set, see RoughSetData
data(RoughSetData)
decision.table <- RoughSetData$pima7.dt

## In this case, let us consider the first and second attributes
conditional.attr <- c(1, 2)

## We are using the "lukasiewicz" t-norm and the "tolerance" relation
## with "eq.1" as fuzzy similarity equation
control.ind <- list(type.aggregation = c("t.tnorm", "lukasiewicz"),
                    type.relation = c("tolerance", "eq.1"))

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

## Compute fuzzy lower and upper approximation using type.LU : "implicator.tnorm"
## Define index of decision attribute
decision.attr = c(9)

## Compute fuzzy indiscernibility relation of decision attribute
## We are using "crisp" for type of aggregation and type of relation
control.dec <- list(type.aggregation = c("crisp"), type.relation = "crisp")

IND.decAttr <- BC.IND.relation.FRST(decision.table, attributes = decision.attr,
                            control = control.dec)

## Define control parameter containing type of implicator and t-norm
control <- list(t.implicator = "lukasiewicz", t.tnorm = "lukasiewicz")

## Compute fuzzy lower and upper approximation
FRST.LU <- BC.LU.approximation.FRST(decision.table, IND.condAttr, IND.decAttr,
              type.LU = "implicator.tnorm", control = control)

## Determine fuzzy positive region and its degree of dependency
fuzzy.region <- BC.positive.reg.FRST(decision.table, FRST.LU)

###############################################################
## B Example : Data analysis based on RST and FRST
## In this example, we are using wine dataset for both RST and FRST
###############################################################
## Load the data
if (FALSE) data(RoughSetData)
dataset <- RoughSetData$wine.dt

## Shuffle the data with set.seed
set.seed(5)
dt.Shuffled <- dataset[sample(nrow(dataset)),]

## Split the data into training and testing
idx <- round(0.8 * nrow(dt.Shuffled))
  wine.tra <-SF.asDecisionTable(dt.Shuffled[1:idx,],
decision.attr = 14, indx.nominal = 14)
  wine.tst <- SF.asDecisionTable(dt.Shuffled[
 (idx+1):nrow(dt.Shuffled), -ncol(dt.Shuffled)])

## DISCRETIZATION
cut.values <- D.discretization.RST(wine.tra,
type.method = "global.discernibility")
d.tra <- SF.applyDecTable(wine.tra, cut.values)
d.tst <- SF.applyDecTable(wine.tst, cut.values)

## FEATURE SELECTION
red.rst <- FS.feature.subset.computation(d.tra,
  method="quickreduct.rst")
fs.tra <- SF.applyDecTable(d.tra, red.rst)

## RULE INDUCTION
rules <- RI.indiscernibilityBasedRules.RST(d.tra,
  red.rst)

## predicting newdata
pred.vals <- predict(rules, d.tst)

#################################################
## Examples: Data analysis using the wine dataset
## 2. Learning and prediction using FRST
#################################################

## FEATURE SELECTION
reduct <- FS.feature.subset.computation(wine.tra,
 method = "quickreduct.frst")

## generate new decision tables
wine.tra.fs <- SF.applyDecTable(wine.tra, reduct)
wine.tst.fs <- SF.applyDecTable(wine.tst, reduct)

## INSTANCE SELECTION
indx <- IS.FRIS.FRST(wine.tra.fs,
 control = list(threshold.tau = 0.2, alpha = 1))

## generate a new decision table
wine.tra.is <- SF.applyDecTable(wine.tra.fs, indx)

## RULE INDUCTION (Rule-based classifiers)
control.ri <- list(
 type.aggregation = c("t.tnorm", "lukasiewicz"),
 type.relation = c("tolerance", "eq.3"),
 t.implicator = "kleene_dienes")

decRules.hybrid <- RI.hybridFS.FRST(wine.tra.is,
  control.ri)

## predicting newdata
predValues.hybrid <- predict(decRules.hybrid,
  wine.tst.fs)

#################################################
## Examples: Data analysis using the wine dataset
## 3. Prediction using fuzzy nearest neighbor classifiers
#################################################

## using FRNN.O
control.frnn.o <- list(m = 2,
  type.membership = "gradual")

predValues.frnn.o <- C.FRNN.O.FRST(wine.tra.is,
  newdata = wine.tst.fs, control = control.frnn.o)

## Using FRNN
control.frnn <- list(type.LU = "implicator.tnorm",k=20,
  type.aggregation = c("t.tnorm", "lukasiewicz"),
  type.relation = c("tolerance", "eq.1"),
  t.implicator = "lukasiewicz")

predValues.frnn <- C.FRNN.FRST(wine.tra.is,
  newdata = wine.tst.fs, control = control.frnn)

## calculating error
real.val <- dt.Shuffled[(idx+1):nrow(dt.Shuffled),
  ncol(dt.Shuffled), drop = FALSE]

err.1 <- 100*sum(pred.vals!=real.val)/nrow(pred.vals)
err.2 <- 100*sum(predValues.hybrid!=real.val)/
  nrow(predValues.hybrid)
err.3 <- 100*sum(predValues.frnn.o!=real.val)/
  nrow(predValues.frnn.o)
err.4 <- 100*sum(predValues.frnn!=real.val)/
  nrow(predValues.frnn)

cat("The percentage error = ", err.1, "\n")
cat("The percentage error = ", err.2, "\n")
cat("The percentage error = ", err.3, "\n")
cat("The percentage error = ", err.4, "\n")

Run the code above in your browser using DataLab