项目作者: ITTcs

项目描述 :
fuzzylab, a Python fuzzy logic library
高级语言: Jupyter Notebook
项目地址: git://github.com/ITTcs/fuzzylab.git
创建时间: 2019-01-30T20:46:32Z
项目社区:https://github.com/ITTcs/fuzzylab

开源协议:GNU General Public License v3.0

下载


fuzzylab

Python Fuzzy Logic library based on Octave Fuzzy Logic Toolkit 0.4.6, considered as a mostly MATLAB-compatible fuzzy logic toolkit for Octave.

The way to use the fuzzylab functions is based on Matlab R2022a Fuzzy Logic Toolbox functions.

This library is more mature compared to the first version and will receive periodic updates.

Research work

Fuzzy Logic Controller with Fuzzylab Python Library and the Robot Operating System for Autonomous Robot Navigation: A Practical Approach

Installation

  1. pip install fuzzylab

Usage

In the folder examples there are some code snippets and the equivalent matlab code for a starting point using the library.

We use fl as the alias for fuzzylab.

  1. import fuzzylab as fl

Example

  1. import fuzzylab as fl
  2. import matplotlib.pyplot as plt
  3. x = fl.arange(0, 0.1, 10)
  4. y = fl.trimf(x, [3, 6, 8])
  5. plt.plot(x,y)
  6. plt.title('trimf, P = [3, 6, 8]')
  7. plt.xlabel('x')
  8. plt.ylabel('Degree of Membership')
  9. plt.ylim([-0.05, 1.05])
  10. plt.show()

trimf

Also we can use a more matlab code style

  1. from fuzzylab import arange, trimf
  2. from matplotlib.pyplot import plot, title, xlabel, ylabel, ylim, show
  3. x = arange(0, 0.1, 10)
  4. y = trimf(x, [3, 6, 8])
  5. plot(x,y)
  6. title('trimf, P = [3, 6, 8]')
  7. xlabel('x')
  8. ylabel('Degree of Membership')
  9. ylim([-0.05, 1.05])
  10. show()

Citing fuzzylab

  1. @Inbook{Avelar2020,
  2. author="Avelar, Eduardo
  3. and Castillo, Oscar
  4. and Soria, Jos{\'e}",
  5. editor="Castillo, Oscar
  6. and Melin, Patricia
  7. and Kacprzyk, Janusz",
  8. title="Fuzzy Logic Controller with Fuzzylab Python Library and the Robot Operating System for Autonomous Robot Navigation: A Practical Approach",
  9. bookTitle="Intuitionistic and Type-2 Fuzzy Logic Enhancements in Neural and Optimization Algorithms: Theory and Applications",
  10. year="2020",
  11. publisher="Springer International Publishing",
  12. address="Cham",
  13. pages="355--369",
  14. isbn="978-3-030-35445-9",
  15. doi="10.1007/978-3-030-35445-9_27",
  16. url="https://doi.org/10.1007/978-3-030-35445-9_27"
  17. }