Skip to content
forked from Haghrah/PyIT2FLS

Type 1 and Interval Type 2 Fuzzy Logic Systems in Python

License

Notifications You must be signed in to change notification settings

sjupas/PyIT2FLS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyIT2FLS

NumPy and SciPy based toolkit for Type 1 and Interval Type 2 Fuzzy Logic Systems.

Licence

PyIT2FLS is published under MIT license. If you are using the developed toolkit, please cite preprint of our paper PyIT2FLS: A New Python Toolkit for Interval Type 2 Fuzzy Logic Systems.

BibTeX:

@misc{haghrah2019pyit2fls,
    title={PyIT2FLS: A New Python Toolkit for Interval Type 2 Fuzzy Logic Systems},
    author={Amir Arslan Haghrah and Sehraneh Ghaemi},
    year={2019},
    eprint={1909.10051},
    archivePrefix={arXiv},
    primaryClass={eess.SY}
}

MLA:

Haghrah, Amir Arslan, and Sehraneh Ghaemi. "PyIT2FLS: A New Python Toolkit for Interval Type 2 Fuzzy Logic Systems." arXiv preprint arXiv:1909.10051 (2019).

Installation

PyIT2FLS can be installed by unzipping the source code in a directory and using this command:

(sudo) python3 setup.py install

Or you can use pip3:

(sudo) pip3 install --upgrade pyit2fls

Versions

Features coming up in the next version

  • Exception handling.
  • Supporting Generalized Type 2 Fuzzy Sets and Systems.

Some notes on version 0.7.9

  • Some bugs (concerning EIASC algorithm) have been fixed in this version.

Some notes on version 0.7.8

  • Some bugs have been fixed in this version.

Some notes on version 0.7.0-0.7.7

  • Supporting fuzzy matrices and related operators.

  • Faster IT2 FLS evaluation (Please visit typereduction package).

  • Introduction of emphasize function for both type 1 and interval type 2 fuzzy sets (See 16th example).

  • New options while calling plot functions (T1FS.plot, IT2FS.plot, T1FS_plot, IT2FS_plot, and TR_plot) have been added.

    • Users can specify the output file format (png, eps, pdf, etc.) while calling the plot function by setting the ext input parameter (with pdf default value).
    • Users can edit the status of the grid in the output plot by setting the grid input parameter (with True default value).
    • Users can edit the x and y-labels by setting the input parameters xlabel and ylabel, respectively. The default value of the xlabel is Domain, and the default value of the ylabel is Membership degree.
  • There are some deprecated functions and classes. After releasing version 1.0.0, deprecated functions and classes will no longer be supported. So:

    • Please use the function IT2FS_LGaussian_UncertStd instead of L_IT2FS_Gaussian_UncertStd.
    • Please use the function IT2FS_RGaussian_UncertStd instead of R_IT2FS_Gaussian_UncertStd.
    • Please use the class IT2Mamdani instead of IT2FLS.
    • Please use the class IT2Mamdani instead of Mamdani.
    • Please use the class IT2TSK instead of TSK.

Some notes on version 0.6.1

  • Some bugs have been fixed in this version.

Some notes on version 0.6

  • Supporting Type 1 Fuzzy Sets and Systems.
  • Supporting elliptic and semi-elliptic membership functions.
  • Supporting generalized bell shaped membership function.
  • Supporting many new t-norms and s-norms.
  • Some bugs have been fixed in this version.

Some notes on version 0.5

  • Supporting both Mamdani and TSK systems.
  • Some bugs have been fixed in this vesion. Now, it is possible to use different domains for FLS inputs and outputs.

Some notes on version 0.4

  • Some bugs have been fixed in this version especially in type reduction algorithms. I would like to say thanks to Dr. K.B Badri Narayanan for reporting the errors.
  • Some new IT2FSs have been added to the toolkit.
  • In previous versions, the height of the IT2FS_Gaussian_UncertStd and IT2FS_Gaussian_UncertMean IT2FSs was fixed to 1, by default. But in the new version, user must give the height value in the parameters list as the last element.

Docstrings

Further information about the functions and classes in the PyIT2FLS are accessible by docstrings. After importing a function or class, they can be seen by calling the help function. For example:

>>> from pyit2fls import IT2FS_Gaussian_UncertStd
>>> help(IT2FS_Gaussian_UncertStd)

Examples

There are some examples provided along with the toolkit which are as below:

  • Ex1: Defining an Interval Type 2 Fuzzy Set (IT2FS).
  • Ex2: Using join and meet operators and plotting the outputs.
  • Ex3: Defining a simple (MIMO) IT2FLS.
  • Ex3 (updated): Example 3 using the IT2Mamdani class.
  • Ex4: Prediction of the Mackey-Glass chaotic time series with PSO-based parameter tuning.
  • Ex4 (updated): Example 4 using the IT2Mamdani class. (PyIT2FLS v0.7.0 and upper)
  • Ex5: Designing Interval Type 2 Fuzzy PID (IT2FPID) controller for a time-delay linear system.
  • Ex5 (updated): Example 5 using the IT2Mamdani class. (PyIT2FLS v0.7.0 and upper)
  • Ex6: Creating and plotting ten types of interval type two fuzzy sets. (PyIT2FLS v0.4.0 and upper)
  • Ex7: Similar to Ex3 but implemented using the new Mamdani class. (PyIT2FLS v0.5.0 and upper)
  • Ex8: Defining a simple multi-input multi-output IT2 TSK FLS. (PyIT2FLS v0.5.0 and upper)
  • Ex8 (updated): Example 8 using the IT2TSK class. (PyIT2FLS v0.7.0 and upper)
  • Ex9: Defining a multi-input multi-output IT2 TSK FLS and plotting the 3D resulting output planes. (PyIT2FLS v0.5.0 and upper)
  • Ex9 (updated): Example 9 using the IT2TSK class. (PyIT2FLS v0.7.0 and upper)
  • Ex10: Defining a multi-input multi-output IT2FLS with different domains for each of input and output variables, and plotting the output surfaces of the system. (PyIT2FLS v0.5.0 and upper)
  • Ex10 (updated): Example 10 using the IT2Mamdani class. (PyIT2FLS v0.7.0 and upper)
  • Ex11: Generating random rule-bases. (PyIT2FLS v0.5.0 and upper)
  • Ex11 (updated): Example 11 using the IT2Mamdani class. (PyIT2FLS v0.7.0 and upper)
  • Ex12: Using six different t-norms with meet operator. (PyIT2FLS v0.6.0 and upper)
  • Ex13: Using six different s-norms with join operator. (PyIT2FLS v0.6.0 and upper)
  • Ex14: MIMO Type 1 Mamdani Fuzzy Logic System. (PyIT2FLS v0.6.0 and upper)
  • Ex15: MIMO Type 1 TSK Fuzzy Logic System. (PyIT2FLS v0.6.0 and upper)
  • Ex16: Using emphasize function for type 1 and interval type 2 fuzzy sets. (PyIT2FLS v0.7.0 and upper)
  • Ex17: Example concerning fuzzy matrices. (PyIT2FLS v0.7.0 and upper)
  • Ex18: Defining random rules and random sets for IT2F classifier with three inputs and one output (Based on the request of one of the users). (PyIT2FLS v0.7.0 and upper)

Some output plots

  • Ex4:

  • Ex5:

  • Ex6:

  • Ex9:

  • Ex10:

About

Type 1 and Interval Type 2 Fuzzy Logic Systems in Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 93.8%
  • C 6.1%
  • Makefile 0.1%