General information
- Current version: 0.7.1
- Current status: beta
- Latest changes: see Release history.
- Actual url is:
Author and licence : LGPL, version 3
The code is copyrighted 2009-2013 Sebastien Kramm, and is released under the terms of the Library General Public Licence (LGPL), version 3. See included gpl.txt file and lgpl.txt file, or http://www.gnu.org/licenses/lgpl.html
For author contact, use firstname DOT lastname AT univ-rouen DOT fr. Feel free to write.
Audience
This library is aimed at C++ developpers who need to add fuzzy logic to their app. Additionaly, it also provides simple applications to learn rules from data, and to process data. These are very basic and should be considered more as sample applications that can be build with the library. (see src/app folder).
Features
Slifis stands for Simple LInear Fuzzy Inference System. It is a C++ library designed for using fuzzy logic inside an application. It can compute a crisp output value from a set of input values and a set of rules. Inference system can be of type 'Mamdani' or 'Takagi-Sugeno'. It can handle the learning situation, where you have data, and you want to build the rules from data. It can also give some information about how well does his training data fit the defined sets of membership functions, through producing of histogram files (see Density information). Persistence is provided through I/O functions, and a graphical application enables interactive evaluating of a FIS. A side library also provides plotting capabilities and an API for showing these plots on screen (relies on external code).
You can also check some Screenshots to see fuzzy logic in action.
See References for more about fuzzy logic and fuzzy inference systems.
The library is organised into two parts (see "Directories" page) :
- The core lib (namespace slifis) code lives inside the src/core folder, while the public interface (header files) is in the include folder. See Users guide.
- The graphical api (namespace slifis_plot) lives inside the gapi folder. It contains code for plotting a membership function or a set of membership functions to an image, and basic graphical user api (see Slifis Graphical API for plotting). It relies on a back-end library that needs to be installed to compile and run.
The core library can itself be viewed as two separate parts:
- first, the fuzzy logic core, dedicated to handling fuzzy concepts,
- second, a data-handling dedicated part. It is not directly related to fuzzy logic but is used to manage data (numerical and string). It shares the same namespace. See Dataset handling.
The src/demo folder contains several small demo applications. In order to be more visual, some of these make use of the gapi interface, so they will build only if gapi is compiled and back-end graphical library is installed on your system.
The src/app folder provides some data related applications. Input format is CSV or ARFF (Weka) files, see Dataset handling.
Downloads
There are several alternatives:
- Source only (warning: trunk may be temporarly broken)
- You can get the latest source code using any svn client with the following command:
- You can also fetch a tarball of the latest source code via the following link (provided automatically by sourceforge.net):
http://slifis.svn.sourceforge.net/viewvc/slifis/?view=tar
- Source + binaries:
- To be sure to get a stable version, download the latest package from http://sourceforge.net/projects/slifis/files/
This includes the binaries (Linux and Windows).
Be advised that size of archive is mostly due to doxygen-generated doc files. For a lighter download, you can choose the _NODOC version.
Two builds are released, one build using Cairo/Gtk2 as back-end graphical library, the other build using Opencv. If you don't intend to use the graphical part, they are both equivalent (source is the same, only compiler flags change).
If you have downloaded only the sources, then see page Building the software.
References
- Start here ;-)
- General topics:
- On Takagi/Sugeno fuzzy inference:
- The original paper: Takagi T. and Sugeno M., Fuzzy identification of systems and its application to modeling and control, IEEE Trans. on Syst., Man & Cybernetics, 15, 1985, pp. 116-132
- About defuzzyfication:
- "Defuzzification: criteria and classification", Werner Van Leekwijck and Etienne E. Kerre, Fuzzy Sets and Systems, Vol.108(2), 1999, Pages 159-178.
- About building a fuzzy rules set from data :
- "Generating Fuzzy Rules by Learning from Examples", Wang & Mendel, IEEE Transactions on Systems, Man, and Cybernetics, 22(6), 1992
- Books:
- "Fuzzy algorithms, with applications to image processing and pattern recognition", Advances In Fuzzy Systems-Applications And Theory - Vol. 10, Z. Chi, H. Yan, T. Pham, ISBN 978-981-02-2697-8, 1996. http://www.amazon.com/Fuzzy-Algorithms-Applications-Recognition-Application/dp/9810226977
- "Fuzzy Control", Kevin M. Passino & Stephen Yurkovitch, Addison Wesley, 1998 : http://www2.ece.ohio-state.edu/~passino/books.html
- "Fuzzy Control Systems Design and Analysis", Kazuo Tanaka & Hua O. Wang, Wiley, 2001 http://books.google.com/books/about/Fuzzy_Control_Systems_Design_and_Analysi.html?id=VH0AFTSmg5AC
Misc information
Size of package
See auto-generated stats here. (Generated using http://cloc.sourceforge.net/)
Documentation
Documentation is self extracted by Doxygen, and released in two forms:
- A set of HTML pages, that are the most complete.
- A pdf file, produced with minimal options and useful only for quickly searching a specific item.
Documentation has two parts, a reference manual, directly extracted from source code, and a Users guide. The latter is written separatly, so it might not always be up to date. To build the doc, use 'make doc', or run Doxygen on one of the three provided doxyfiles (see Building the software).
Logo
Yeah, I know, great logo... ;-) It's from http://creatr.cc/
Contributing
If you are interested in this project, you can contribute. Several topics that would need some improvments are listed below, if you feel you can help, please contact author.
- reporting any build problems is actually the simplest: just dowload one of the latest packages, unzip it somewhere, try to build it (just open a terminal and hit "make lib" for instance), and report any problems.
- Testing/validating with real-world data is always valuable, and will help tracking down bugs.
- Reporting documentation errors or API inconsistencies is very valuable.
- If you are good with parser-building tools (flexx/yacc or any other), a FCL parser would be highly valuable, and I will have no time to dive into this at present.
- And of course any suggestion or feedback on any topic is welcome.
- Oh, and if you happen to be good at logo design, you probably can do something about that terrible thing lying on top of this page.
Motivations and related projects
This has started in 2007, when I needed a FOSS fuzzy library for a scientific project. After some time searching an open-sourced C++ library, I came across these three:
After spending some time checking these, I realised that for several reasons, none would do the job. I finally gave out, thinking (as usual, NIH syndrome!) that it would be easy and quick for me to rebuild something from scratch that would target my needs, rather than spending weeks tuning and understanding something I didn't write. It was of course longer that what I thought...
In the meanwhile, the following projects have emerged and might also be interesting for you: