Learn R Programming

frbs (version 1.0-0)

frbs-package: Getting started with the frbs package

Description

Fuzzy rule-based systems (FRBS) are based on the fuzzy concept proposed by Zadeh in 1965, which represents the reasoning of human experts in production rules (a set of IF-THEN rules) to handle real-life problems from domains such as control, prediction and inference, data mining, bioinformatics data processing, robotics, and speech recognition. FRBSs are also known as fuzzy inference systems and fuzzy models. When applied to specific tasks, they may also be known under specific names such as fuzzy associative memories or fuzzy controllers. In this package, we consider systems with multiple inputs and a single output (MISO), with real-valued data.

Arguments

Details

FRBSs are a competitive alternative to other classic models and algorithms in order to solve classification and regression problems. Generally, an FRBS consists of four functional parts:
  • a fuzzification interface which transforms the crisp inputs into degrees of membership function of the fuzzy term of a linguistic variable. Seefuzzifier.
  • a knowledge base composed of a database and a rulebase. While the database includes the fuzzy set definitions, the rulebase contains the fuzzy IF-THEN rules. We will represent the knowledge as a set of rules. Each one has the following structure.IF premise (antecedent), THEN conclusion (consequent). Seerulebase.
  • an inference engine which performs the inference operations on the fuzzy IF-THEN rules. There are two kinds of inference for fuzzy systems based on linguistic rules: The Mamdani and the Takagi Sugeno Kang model. Seeinference.
  • a defuzzification process to obtain the crisp values. There are several methods for defuzzification such as the weighted average, centroid, etc. Seedefuzzifier.

Since it may be difficult to obtain information from human experts in the form required, an alternative and effective way to acquire the knowledge is to generate the fuzzy IF-THEN rules automatically from the input data. In general, when modeling an FRBS, there are two important processes which should be conducted, namely structure identification and parameter estimation. Structure identification is a process to find appropriate fuzzy IF-THEN rules and to determine the overall number of rules. Parameter estimation is applied to tune the parameters on the consequent and/or antecedent parts of the fuzzy IF-THEN rules. Many approaches have been proposed in order to perform this modeling such as a table-lookup scheme, heuristic procedures, neuro-fuzzy techniques, clustering methods, genetic algorithms, least squares methods, gradient descent, etc. In this package, the following approaches to generate fuzzy IF-THEN rules have been implemented:

  • Wang and Mendel's Method (WM):WMandfrbs.eng.
  • The genetic fuzzy system (GFS):GFSandfrbs.eng.
  • The hybrid neural fuzzy inference system (HyFIS):HyFISandfrbs.eng.
  • The adaptive-network-based fuzzy inference system (ANFIS):ANFISandfrbs.eng.
  • The fuzzy rule-based classification system (frcs):frcsandfrcs.eng.
  • The dynamic evolving neural-fuzzy inference system (DENFIS):DENFISandDENFIS.eng.
  • The subtractive clustering and fuzzy c-means (SBC):SBCandSBC.test.
  • The fuzzy inference rules by descent method (DM):DMandfrbs.eng.
  • The FRBS using heuristics and gradient descent method (HGD):HGDandfrbs.eng.
  • The multi-stage genetic fuzzy systems (MSGFS) based on iterative rule learning approach:MSGFSandMSGFS.test.
The functions documented in the manual for the single methods are all called internally by frbs.learn, which is the central function of the package. However, in the documentation of each of the internal learning functions, we give some theoretical background and references to the original literature.

Usage of the package:

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.

The main functions of the package are the following:

  • The functionfrbs.learnallows to generate the model by creating fuzzy IF-THEN rules or cluster centers from training data. The different algorithms mentioned above are all accessible through this function. The outcome of the function is anfrbs-object.
  • Even though the main purpose of this package is to generate the FRBS models automatically, we provide the functionfrbs.gen, which can be used to build a model manually without using a learning method.
  • The purpose of the functionpredictis to obtain predicted values according to the testing data and the model (analogous to thepredictfunction that is implemented in many other R packages).
  • There exist functionssummary.frbsandplotMFto show a summary about anfrbs-object, and to plot the shapes of the membership functions.

To get started with the package, the user can have a look at the examples included in the documentation of the functions frbs.learn for generating models and predict for the prediction phase.

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

demo()

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

Currently, there are the following demos available:

Regression using the Gas Furnance dataset:

demo(WM.GasFur), demo(SBC.GasFur), demo(ANFIS.GasFur),

demo(HGD.GasFur), demo(DENFIS.GasFur), demo(HyFIS.GasFur),

demo(GFS.GasFur), demo(DM.GasFur), demo(MSGFS.GasFur)

Regression using the Mackey-Glass dataset:

demo(WM.MG1000), demo(SBC.MG1000), demo(ANFIS.MG1000),

demo(HGD.MG1000), demo(DENFIS.MG1000), demo(HyFIS.MG1000),

demo(GFS.MG1000), demo(DM.MG1000), demo(MSGFS.MG1000)

Classification using the Iris dataset:

demo(WM.Iris), demo(SBC.Iris), demo(ANFIS.Iris),

demo(HGD.Iris), demo(DENFIS.Iris), demo(HyFIS.Iris),

demo(GFS.Iris), demo(DM.Iris), demo(MSGFS.Iris), demo(frcs.Iris)

The Gas Furnance data and Mackey-Glass data are included in the package, please see frbsData. The Iris data is the standard Iris dataset that ships with R.

Also have a look at the package webpage http://sci2s.ugr.es/dicits/software/FRBS, where we provide a more extensive introduction as well as additional explanations of the procedures.

References

C.C. Lee, "Fuzzy Logic in control systems: Fuzzy Logic controller part I", IEEE Trans. Syst., Man, Cybern., vol. 20, no.2, pp. 404 - 418 (1990).

C.C. Lee, "Fuzzy Logic in control systems: Fuzzy Logic controller part II",IEEE Trans. Syst., Man, Cybern., vol. 20, no.2, pp. 419 - 435 (1990).

D. Dubois and H. Prade, "Fuzzy Sets and Systems: Theory and Applications," New York: Academic (1980).

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

Mamdani, E. H., & Assilian, S., "An experiment in linguistic synthesis with a fuzzy logic controller," International Journal of Man Machine Studies, 7(1), pp. 1 - 13 (1975).

M. Sugeno and G. T. Kang, "Structure identification of fuzzy model," Fuzzy Sets Syst., vol. 28, pp. 15 - 33 (1988).

Takagi, T., Sugeno, M., "Fuzzy identification of systems and its application to modelling and control", IEEE Transactions on Systems, Man and Cybernetics 15(1), pp. 116 - 132 (1985).

W. Pedrycz, "Fuzzy Control and Fuzzy Systems," New York: Wiley (1989).

See Also

frbs.learn and predict for the learning and prediction stage, respectively.