Implementation belonging to the Bachelor thesis at University of Osnabrück by Julia Hattendorf
Publication: TBA
You can listen to the podcast episode about the topic here
- Numpy 1.21.4
- Python 3.9.7
- pandas 1.3.4
- matplotlib 3.4.3
- Clone the Repository or Download the ZIP File and extract.
- Follow instructions from /set_up/cheatsheet.txt
- Open the main.py either by navigating with the terminal or by using your preferred IDE
- Make sure the environment that includes the required packages is activated
- run main.py
- neuro-fuzzy = models that adjust fuzzy sets and rules according to neural networks tuning techniques
- neuro-fuzzy system = when the model can act as a fuzzy system once it is trained
- Knowledge acquisition directly from data
- White box neural nets
The architecture is comprised of three layers: for fuzzification, for the IF-part of a rule and for the THEN-part of a rule. The propagation of the input through the architecture is computed as follows:
Fuzzification-Layer:
The input vector
IF-Layer:
The fuzzified inputs are combined via a T-norm operation, here multiplication. This represents the if-part of the fuzzy rule. The outputs of this layer is referred to as the rule strengths
THEN-Layer:
The rule strengths are mapped to classes by one-hot encoded class weights.
The Iris dataset is a popular classification problem where four features were measured for the three iris species setosa, versicolor, virginica.
On the right is a scatter plot of the Iris Dataset. The first 50 samples belong to the species setosa, the samples from 50 to 100 to versicolor, and the samples from 100 to 150 to virginica.
Each operation that is performed on the neuro-fuzzy architecture is implemented in a script, i.e. Builder, Trainer, Classifier, and Rule Miner.
Builder:
- initializes the free parameters: parameters of the membership functions, and class weights
Trainer:
- trains the parameters of the membership functions with gradient descent
Rule Miner:
- extracts the IF-THEN rules from a trained neuro-fuzzy model
Classifier:
- propagates a sample through the model and outputs the class with the highest activation
