Releases: jsuarez2001/neuro-fuzzy-toolbox
Release list
v0.1.0 - Initial release
Neuro-Fuzzy Toolbox v0.1.0 — Initial Release
This is the first public release of the Neuro-Fuzzy Toolbox, a PyTorch-based library for the design, training, and analysis of ANFIS-based neuro-fuzzy models.
Overview
The toolbox provides a modular framework that explicitly separates model definition, internal layers, membership functions, learning algorithms, and rule-analysis utilities, making each component independently accessible and extensible.
Models
- ANFIS — General model with an arbitrary number of membership functions per input variable.
- h_ANFIS — Homogeneous variant in which all input variables share the same number of membership functions, improving computational efficiency.
- rule_reduced_ANFIS — Rule-reduced variant that avoids the classical combinatorial construction of rules, resulting in a more flexible and efficient model suited for high-dimensional inputs.
Training strategies
- Hybrid learning algorithm — Inspired by the classical ANFIS scheme proposed by Jang (1993), combining least-squares estimation for consequent parameters with gradient descent for premise parameters.
- Basic optimizer training — Single-optimizer gradient-based training using any PyTorch optimizer.
- Double optimizer training — Separate optimizers for premise and consequent parameters.
- SONFIS — Self-organizing algorithm for structural adaptation of rule-reduced models, incorporating rule growing, splitting, and pruning during training.
Membership functions
- Gaussian (
Gaussian_MF) - Generalized Bell (
GeneralizedBell_MF) - High-Slope Bell (
HighSlopeBell_MF)
Rule inspection and analysis
- Tabular export of premises and consequents as
pandasDataFrames viaget_rules_structure() - Visualization of membership functions via
plot_premises() - Access to intermediate layer outputs
- Local rule-contribution analysis via
RulesAnalyzer
Low-level API
For users requiring finer control, model parameters are organized and accessible by component, so premises and consequents can be retrieved independently and passed to PyTorch optimizers over arbitrary parameter subsets. Rules can also be added (add_rules()) and removed (remove_rules()) programmatically at runtime (only for the rule_reduced_ANFIS class).
Installation
pip install neuro-fuzzy-toolboxRequirements
- Python 3.10–3.12 (tested in 3.12.3)
- PyTorch >= 2.5 (tested in 2.5.1)
- NumPy >= 2.2 (tested in 2.2.1)
- Pandas >= 2.2 (tested in 2.2.3)
- Matplotlib >= 3.10 (tested in 3.10.0)
Documentation
Full documentation is available at: https://neuro-fuzzy-toolbox.readthedocs.io/en/latest/
License
MIT License
Note: The installation page in the docs shipped in Spanish in this release.
This has been corrected in themainbranch. See the
latest documentation.