pyfuzzy-toolbox
A comprehensive Python library for Fuzzy Systems with focus on education and professional applications. Includes inference, learning, fuzzy differential equations, and p-fuzzy systems.
📚 Documentation
- Getting Started: Installation and quick tutorials
- User Guides: In-depth guides for each module
- API Reference: Complete method documentation
- Examples: 18+ interactive Colab notebooks
📦 Installation
Basic Installation (Library only)
pip install pyfuzzy-toolbox
Full Installation (with Web Interface)
For the complete experience including the interactive web interface:
macOS/Linux (Zsh/Bash):
pip install 'pyfuzzy-toolbox[ui]'
Windows (PowerShell/CMD):
pip install pyfuzzy-toolbox[ui]
Note: Package name is pyfuzzy-toolbox, import as fuzzy_systems:
import fuzzy_systems as fs
🖥️ Web Interface (NEW!)
Launch the interactive web interface with a single command:
pyfuzzy interface
This opens a modern Streamlit-based interface featuring:
- 🎯 ANFIS: Complete workflow (data → training → evaluation → prediction)
- 📊 Interactive visualizations: Membership functions, decision surfaces, training curves
- 🔮 Real-time predictions: Manual input or batch CSV upload
- 📈 Model analysis: Rules visualization, feature importance, sensitivity analysis
- 💾 Export capabilities: Models, predictions, and results
CLI Commands
# Launch web interface (browser opens automatically)
pyfuzzy interface
# Custom port and dark theme
pyfuzzy interface --port 8080 --dark-theme
# Headless mode (no browser)
pyfuzzy interface --no-browser
# Show version
pyfuzzy version
# Help
pyfuzzy --help
Programmatic API
Launch the interface from Python code or Jupyter notebooks:
from fuzzy_systems import launch_interface
# Simple launch
launch_interface()
# Custom configuration
launch_interface(
port=8080,
theme='dark',
open_browser=True
)
🧩 Core Modules
fuzzy_systems.core
Fundamental fuzzy logic components
- Membership functions:
triangular,trapezoidal,gaussian,sigmoid,generalized_bell - Classes:
FuzzySet,LinguisticVariable - Operators:
fuzzy_and_min,fuzzy_or_max,fuzzy_not
fuzzy_systems.inference
Fuzzy inference systems
- MamdaniSystem: Classic fuzzy inference with defuzzification (COG, MOM, etc.)
- SugenoSystem: TSK systems with functional outputs (order 0 and 1)
fuzzy_systems.learning
Learning and optimization
- ANFIS: Adaptive Neuro-Fuzzy Inference System
- WangMendel: Automatic rule generation from data
- MamdaniLearning: Gradient descent and metaheuristics (PSO, DE, GA)
fuzzy_systems.dynamics
Fuzzy dynamic systems
- FuzzyODE: Solve ODEs with fuzzy uncertainty (α-level method)
- PFuzzySystem: Discrete and continuous p-fuzzy systems
📓 Interactive Notebooks
Explore hands-on examples organized by topic:
| Topic | Notebooks | Description |
|---|---|---|
| 01_fundamentals | 2 notebooks | Membership functions, fuzzy sets, operators, fuzzification |
| 02_inference | 4 notebooks | Mamdani and Sugeno systems |
| 03_learning | 7 notebooks | Wang-Mendel, ANFIS, optimization |
| 04_dynamics | 5 notebooks | Fuzzy ODEs, p-fuzzy systems |
All notebooks can be opened directly in Google Colab!
📖 Quick Start Guides
Comprehensive guides for each module with theory, examples, and best practices:
🎛️ Inference Systems
Build fuzzy control systems and decision-making tools.
|
Linguistic fuzzy inference with interpretable rules.
|
Efficient inference with mathematical consequents.
|
🧠 Learning & Optimization
Automatic rule generation and parameter tuning from data.
|
Single-pass rule extraction.
|
Neuro-fuzzy hybrid learning.
|
Optimize existing systems.
|
🌊 Dynamic Systems
Model temporal evolution with fuzzy uncertainty.
|
Discrete-time dynamics.
|
Continuous-time dynamics.
|
ODEs with fuzzy uncertainty.
|
⚡ Quick Example
import fuzzy_systems as fs
# Create Mamdani system
system = fs.MamdaniSystem()
system.add_input('temperature', (0, 40))
system.add_output('fan_speed', (0, 100))
# Add terms
system.add_term('temperature', 'cold', 'triangular', (0, 0, 20))
system.add_term('temperature', 'hot', 'triangular', (20, 40, 40))
system.add_term('fan_speed', 'slow', 'triangular', (0, 0, 50))
system.add_term('fan_speed', 'fast', 'triangular', (50, 100, 100))
# Add rules
system.add_rules([('cold', 'slow'), ('hot', 'fast')])
# Evaluate
result = system.evaluate(temperature=25)
print(f"Fan speed: {result['fan_speed']:.1f}%")
🔗 Links
- Documentation: https://1moi6.github.io/pyfuzzy-toolbox/
- PyPI: https://pypi.org/project/pyfuzzy-toolbox/
- GitHub: https://github.com/1moi6/pyfuzzy-toolbox
📝 Citation
@software{pyfuzzy_toolbox,
title = {pyfuzzy-toolbox: A Comprehensive Python Library for Fuzzy Systems},
author = {Cecconello, Moiseis},
year = {2025},
url = {https://github.com/1moi6/pyfuzzy-toolbox},
note = {Includes inference, learning, fuzzy differential equations, and p-fuzzy systems}
}
📄 License
MIT License - see LICENSE for details.
Metadata
Release files for pyfuzzy-toolbox 1.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyfuzzy_toolbox-1.1.8.tar.gz | 6.7 MB | Without provenance | Details for pyfuzzy_toolbox-1.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyfuzzy_toolbox-1.1.8-py3-none-any.whl | Python 3 | none | any | Details for pyfuzzy_toolbox-1.1.8-py3-none-any.whl |
Total release size: 7.0 MB
Release files / pyfuzzy_toolbox-1.1.8.tar.gz
| Download URL | pyfuzzy_toolbox-1.1.8.tar.gz |
|---|---|
| Size | 6.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d738c31d3dc5733a9c363e2eb09668c67328210ee2bf441e6b6bad801e931fa6
|
|
BLAKE2b-256 checksum How to use checksums |
8d3384bc3d718ce4f10fb193db34a2ed3f3a8dfdede2ed05eb093d18f5a7dbc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / pyfuzzy_toolbox-1.1.8-py3-none-any.whl
| Download URL | pyfuzzy_toolbox-1.1.8-py3-none-any.whl |
|---|---|
| Size | 314.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c637f094f8947d58dbab35f4838984897c1f80ab488ad002b1c7f0c2996fe128
|
|
BLAKE2b-256 checksum How to use checksums |
fff0605a7d21f0c34c154dff9f1776d3dbda981164902657a1ead72a5aee5ee6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for pyfuzzy-toolbox 1.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.