Anfis
Python implementation of an Adaptive neuro fuzzy inference system
Install / Use
/learn @twmeggs/AnfisREADME
ANFIS
anfis is a Python implementation of an Adaptive Neuro Fuzzy Inference System.
This ANFIS package is essentially a Python refactoring of the R code created by the team a the BioScience Data Mining Group, the original documentaion of which can be found here:
http://www.bdmg.com.ar/?page_id=176
As an exmaple of an ANFIS system, this Python code works (install and run the tests.py script to see it fit the some test data) but there is much left to do in order to improve the project. This is very much an early beta version. My python code is cruddy and NOT at all idiomatic. Documentation and doc strings need large amounts of work.
All useful contributions to make this a better project will be happily received.
Contributions
If you would like to contribute, please see the Issues section for ideas about what most needs attention.
Features
-
Currently the implementation will support the use of three types of membership function:
-
gaussmf: Gaussian
-
gbellmf: Generalized bell
-
sigmf: Sigmoid
This naming is taken from scikit-fuzzy, a fuzzy logic toolkit for SciPy, which can be found here: https://github.com/scikit-fuzzy/scikit-fuzzy
Each input variable can have an arbitrary number and mix of these membership functions.
-
A user can define the number of epochs that will be run
-
The returned ANFIS object can plot training errors, fitted results and the current shape of its membership functions (pre or post training)
Installation
anfis may then be installed by running:
$ pip install anfis
Dependencies
- Python
- numpy
- scikit-fuzzy
- matplotlib
Quickstart
Install anfis and navigate to the location of anfis/tests.py
From the command line run:
python tests.py
Alternatively, from the same location launch ipython and run:
run tests.py
This will set up and fit an ANFIS model based on the data contained in 'trainingSet.txt', using 10 epochs. Plots of the fitting errors and the model predicted output are graphed.
Contact
For other questions, please contact twmeggs@gmail.com.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
