To build the model,we created, trained, and tested Adaptive Network-based Fuzzy Inference System
(ANFIS).We performed the following tasks:
1.Data pre-processing
2.Loading the Data
3.Generating the Initial ANFIS Structure
4.Training the ANFIS
5.Validating the Trained ANFIS
1.Data pre-processing
We generated 70 data from our experiment and then picked $1\over 5$ of them randomly as Training Data. The other $4\over 5$ is treated as Testing Data.
Because our results are too large (at least 108), we divided them by 1 x 106. This can help us analyzed these results more quickly.
2.Loading the Data
To train the ANFIS, we must begin by loading a Training data set that contains the desired input/output data of the system to be modeled. Any data set we load must be an array with the data arranged as column vectors, and the output data in the last column.We also loaded Testing data.
3.Generating the Initial ANFIS Structure
Before we start the ANFIS training, we specify an initial ANFIS model structure as below:
![](https://static.igem.org/mediawiki/2014/8/8c/TCU_MD_Structure.png) |
Fig3.1 Initial ANFIS Model Structure |
The branches in this graph are color coded. Color coding of branches characterize the rules and indicate whether or not and, not, or or are used in the rules. The input is represented by the left-most node and the output by the right-most node. The node represents a normalization factor for the rules.
4.Training the ANFIS
After loading the training data and generating the initial ANFIS structure, we started training the ANFIS. The number of training Epochs(Epochs means number of iterations) is over 2500.
During training we can see how Training error develops as below:
![](https://static.igem.org/mediawiki/2014/d/dd/TCU_MD_Training_error.png) |
Fig3.2 Training Error |
5.Validating the Trained ANFIS
Finally,we had to test our data against the trained ANFIS.After the ANFIS is trained, validate the model using a Testing data that differs from the one we used to train the ANFIS.
When we test the testing data against the ANFIS, it looks satisfactory.
![](https://static.igem.org/mediawiki/2014/e/e1/TCU_MD_Test.png) |
Fig3.3 Testing our data against the trained ANFIS |