A PyTorch-based library for the design, training, and analysis of ANFIS-based neuro-fuzzy models. The toolbox provides ready-to-use model variants and training algorithms, a structural adaptation algorithm, and utilities for rule inspection and local contribution analysis. Its modular design also makes it a flexible basis for building custom training procedures and deep neuro-fuzzy architectures.
pip install neuro-fuzzy-toolbox- Three ANFIS model variants: classical
ANFIS, homogeneoush_ANFIS, andrule_reduced_ANFISfor high-dimensional settings. - Multiple training strategies: hybrid learning algorithm, single-optimizer training, and dual-optimizer training with independent premise and consequent optimizers. All strategies integrate with PyTorch loss functions and support early stopping.
- Structural adaptation: a modified SONFIS algorithm for
rule_reduced_ANFISmodels, supporting rule growing, splitting, and pruning during training. - Rule inspection and analysis: tabular export of premises and consequents,
membership function visualization, intermediate layer access, and local
rule-contribution analysis via
RulesAnalyzer. - Low-level API: direct access to premise and consequent parameter subsets for custom optimizer instantiation, and programmatic rule addition and removal at runtime.
- torch >= 2.5 (tested with 2.5.1)
- numpy >= 2.2 (tested with 2.2.1)
- pandas >= 2.2 (tested with 2.2.3)
- matplotlib >= 3.10 (tested with 3.10.0)
Full documentation including a usage guide, API reference, and end-to-end examples is available at: https://neuro-fuzzy-toolbox.readthedocs.io/en/latest/