pyFUME
A Python package for automatic Fuzzy Model Estimation from data.
pyFUME is a comprehensive Python library designed to automate the estimation of Takagi-Sugeno fuzzy models directly from data. By integrating seamless model building with the Simpful library, it enables researchers to transform raw datasets into interpretable, executable fuzzy systems. Simpful is another of our project: check it out here.
Fuzzy Logic Model Estimation
Key Features
- Automated Estimation: Determine antecedent sets and consequent parameters of Takagi-Sugeno models.
- Feature Selection: Built-in support for advanced wrappers like
fst-pso(Particle Swarm Optimization). - Interpretability: Bridges the gap between raw data and human-understandable fuzzy rules.
- Simpful Integration: Automatically generates executable Python code for fuzzy inference.
- Performance Evaluation: Facilities for error calculation (MAE, MSE) and visualization.
Quick Start
Getting started with pyFUME is as simple as:
pip install pyfume
from pyfume import pyFUME
# Generate the Takagi-Sugeno Fuzzy Inference System (FIS)
# using 3 clusters and PSO-based feature selection
FIS = pyFUME(datapath='./data.csv', nr_clus=3, feature_selection='fst-pso')
# Evaluate accuracy
MAE = FIS.calculate_error(method="MAE")
print(f"Model Error: {MAE}")
# Use the model for prediction
model = FIS.get_model()
model.set_variable('Cement', 300.0)
print(model.Sugeno_inference(['OUTPUT']))
Technical Highlights
Clustering
Uses Fuzzy C-Means (FCM) to identify data structures in input-output space.
Estimation
Automatically determines membership function shapes (Gaussian/Triangular).
Synthesis
Generates 'Simpful_code.py' for immediate deployment in production.
Related Publications
2024
2023
- Estimation of fuzzy models from mixed data sets with pyFUMEIn 2023 IEEE Conference on Computational Intelligence in Bioinformatics and Computational Biology (CIBCB), 2023
2020
- pyFUME: a Python package for fuzzy model estimationIn 2020 IEEE international conference on fuzzy systems (FUZZ-IEEE), 2020