Scikit-ANFIS: A Scikit-Learn Compatible Python Implementation for Adaptive Neuro-Fuzzy Inference System

Dongsong Zhang,Tianhua Chen
DOI: https://doi.org/10.1007/s40815-024-01697-0
IF: 4.085
2024-06-05
International Journal of Fuzzy Systems
Abstract:The Adaptative neuro-fuzzy inference system (ANFIS) has shown great potential in processing practical data from control, prediction, and inference applications, reflecting advantages in both high performance and system interpretability as a result of the hybridization of neural networks and fuzzy systems. Matlab has been a prevalent platform that allows to utilize and deploy ANFIS conveniently. On the other hand, due to the recent popularity of machine learning and deep learning, which are predominantly Python-based, implementations of ANFIS in Python have attracted recent attention. Although there are a few Python-based ANFIS implementations, none of them are directly compatible with scikit-learn, one of the most frequently used libraries in machine learning. As such, this paper proposes Scikit-ANFIS, a novel scikit-learn compatible Python implementation for ANFIS by adopting a uniform format such as fit () and predict () functions to provide the same interface as scikit-learn. Our Scikit-ANFIS is designed in a user-friendly way to not only manually generate a general fuzzy system and train it with the ANFIS method but also to automatically create an ANFIS fuzzy system. We also provide four kinds of representative cases to show that Scikit-ANFIS represents a valuable addition to the scikit-learn compatible Python software that supports ANFIS fuzzy reasoning. Experimental results on four datasets show that our Scikit-ANFIS outperforms recent Python-based implementations while achieving parallel performance to ANFIS in Matlab, a standard implementation officially realized by Matlab, which indicates the performance advantages and application convenience of our software.
computer science, information systems,automation & control systems, artificial intelligence
What problem does this paper attempt to address?
The paper mainly addresses the following issues: 1. **Compatibility Issue**: Existing Python implementations of Adaptive Neuro-Fuzzy Inference Systems (ANFIS) are not compatible with the widely used machine learning library scikit-learn. 2. **User-Friendliness Issue**: Existing ANFIS Python implementations are often not user-friendly, especially in terms of manually creating general fuzzy systems and automatically creating ANFIS fuzzy systems. 3. **Performance Issue**: The paper proposes a new Python implementation (Scikit-ANFIS) aimed at improving the performance of ANFIS in the Python environment and ensuring comparable performance to the official Matlab implementation of ANFIS. Specifically, the paper proposes Scikit-ANFIS, a scikit-learn compatible Python implementation for Adaptive Neuro-Fuzzy Inference Systems (ANFIS). The main contributions of Scikit-ANFIS include: - Full compatibility with commonly used scikit-learn functions such as `fit()` and `predict()`, allowing developers to easily integrate ANFIS with other machine learning models. - Support for defining general-purpose Takagi-Sugeno-Kang (TSK) fuzzy systems through natural language, which is currently the only Python implementation supporting complex rules and logical operations. - The ability to use scikit-anfis classes to train existing TSK fuzzy systems and automatically generate ANFIS fuzzy systems based on user-specified input-output data pairs. - Implementation of automatic saving and loading of trained optimal ANFIS, a feature not provided by other Python implementations. Through research and experimental validation with four representative cases, Scikit-ANFIS has demonstrated superior performance compared to recent Python-based ANFIS implementations and similar performance to the official Matlab implementation of ANFIS, indicating significant application value and convenience of Scikit-ANFIS.