# iMU-ZOTS Toolbox¶

**This toolbox contains the proposed iterative learning approach to learn a fuzzy system** composed of addition of multiple univariate zero-order T-S fuzzy systems, called iMU-ZOTS, published in:

Jérôme Mendes, Francisco A. A. Souza, Ricardo Maia, and Rui Araújo.

**Iterative learning of multiple univariate zero-order t-s fuzzy systems.**In Proc. of the The*IEEE 45th Annual Conference of the Industrial Electronics Society (IECON 2019)*, pages 3657-3662, Lisbon, Portugal, October 14-17 2019. IEEE. [doi]

**Abstract:** This paper proposes an iterative learning approach to learn a fuzzy system composed of a sum of multiple univariate zero-order Takagi-Sugeno (T-S) fuzzy systems. The learning algorithm is based on the backfitting algorithm, and new fuzzy rules are iteratively added based on a novelty detection criterion, which gives the novelty degree of a new data by a value between zero and one, allowing an easier rule creation threshold’s definition. In order to validate the performance of the proposed approach, 10 benchmark data sets are used to compare the proposed approach with two well-known state-of-the-art methods, the Extreme Learning Machine (ELM), and the Support Vector Regression (SVR), and with the GAM-ZOTS approach, which model is similar to the proposed approach. From the results, it is concluded that the proposed approach outperforms ELM, SVR and GAM-ZOTS in almost all data sets.

**Software source code:** iMU-ZOTS Toolbox (Matlab implementation)

## How to Run¶

*For use with Matlab*. You can run the iMU-ZOTS toolbox with GUI (Graphical User Interface), **Main.m**, or without, **Main_noGUI.m**.

**Main_noGUI.m**– Just run the Main_noGUI.m file to start iMU-ZOTS toolbox without a GUI.**Main.m**– Run the Main.m file, and a GUI will appear (Figure 1) to configure the main parameters. Click in “Run”.

## Main Functions¶

**Main.m**– This is the main function to run iMU-ZOTS toolbox with a GUI.**Main_noGUI.m**– This is the main function to run iMU-ZOTS toolbox without a GUI.**FAM.m**- This function represents the GAM-ZOTS learning algorithm (Algorithm 2) to be used as an initialization on Algorithm 3.**Initialization.m**- This function initializes the struct x, i.e. the initial parameters (Algorithm 3 Step 2).**Initialization_omega_all.m**- This funcions initializes the variable \(\omega\).**Epsilons_all_C_opt.cpp**- This mex function obtains the value of the variable \(\omega\) for all dataset.**AdditiveModels_C_opt.cpp**- This function mex performs the GAM-ZOTS method (Algorithm 2)**AFAM_ND.m**- This function represents the iterative learning of iMU-ZOTS algorithm (Algorithm 3 Step 4).**NoveltyMeasuring.m**- This function measure the novelty for all input variables - Algorithm 3 Step 4ai.**LocateMFnearest.m**- This function locates the nearest left and right membership functions (MFs) to the candidate MF.**AddMF_NovMea.m**- This function adds a new rule if criteria 1 and 2 are met - Algorithm 3 Step 4aiiA.**FinalyModel_C.cpp**- This mex function gives the estimation of the learned fuzzy system.**PlotMFs.m**- This function presents the plots of the membership functions of all input variables.

## Main Configuration Files¶

**ParametersConfig_noGUI.m**– This file contains the main variables of the algorithm:lim_it - Maximal number of learning interactions, \(lim_{it}\).

limit_theta- Termination condition \(\epsilon\) defined on Algorithm 2 Step 2.b.ii.

th_M - Threshold \(M_{th}\) (Criterion 1).

eta - Maximal number of MFs, to be used on Threshold \(\eta_j\) (Criterion 2).

**DatasetConfig_noGUI.m**– This file contains the definition of the dataset. Change it to test on another dataset.

*Configuration on the GUI interface*: Using the Graphical User Interface (GUI), the above parameters presented on **ParametersConfig_noGUI.m** and **DatasetConfig_manually.m** are defined on the GUI (see Figure 1).

## Definition of the Struct x¶

x is a struct, in which, contains all parameters of the neo-fuzzy neuron system.

**Elements of struct x, Rows:** contain all parameters of the zero-order T-S fuzzy system for each input variable, e.g.:

**row 1**contains the parameters of the zero-order T-S fuzzy system for the input variable \(x_1\)**row j**contains the parameters of the zero-order T-S fuzzy system for the input variable \(x_j\)Figure 2 contains the parameters of the 13 input variables of the Boston Housing dataset.

**Elements of struct x, Columns:**

**First column:**contains the limits of the universe of discourse of the respective input variable.**Second column:**contain the matrix rules of the respective input variable (Figure 3):**Rows:**each row represents a fuzzy rule;**1º column:**represents parameter \(a_{j,i}\) (lower limit of the respective membership function);**2º column:**represents parameter \(b_{j,i}\) (center value of the respective membership function);**3º column:**represents parameter \(c_{j,i}\) (upper limit of the respective membership function);**4º column:**represents the consequent parameter of the respective rule, \(\theta_{j,i}\).

**Third column:**represents the bias (\(bias_j\)) of the model of the respective input variable,**Fourth column:**represents the bias (\(y_0\)) of the general model. Just the first row is used.

## Results presented in the GUI¶

Using the GUI to run the iMU-ZOTS toolbox the results are presented on the GUI represented by Figure 5, in which,

it can be seen the training and testing errors;

it can plot the final membership function of all input variables or on just a specific input variable;

and it can plot the estimated output variable on the train and test datasets.