One of the famous Python libraries for fuzzy logic is
scikit-fuzzy. Several fuzzy logic algorithms have already been implemented on this library. Since
scikit-fuzzy is an open source library, you can review the source code at https://github.com/scikit-fuzzy/scikit-fuzzy.
Before you install this library, you should already have installed
SciPy libraries. You can install
pip, by typing the following command:
$ sudo pip install scikit -fuzzy
As another option, you can install the
scikit-fuzzy library from source code.
Type these commands:
$ git clone https://github.com/scikit-fuzzy/scikit-fuzzy $ cd scikit-fuzzy/ $ sudo python setup.py install
After completing the installation, you can use
scikit-fuzzy. To test how to work with
scikit-fuzzy, we will build a fuzzy membership for temperature using the
fuzz.trimf() function. You can write the following scripts:
import matplotlib matplotlib.use('Agg') import numpy as np import skfuzzy as fuzz import matplotlib...