| Fuzzy Logic Toolbox | ![]() |
To get started with the ANFIS Editor GUI, type
anfisedit
The following GUI will appear on your screen.

From this GUI you can:
Load data (training, testing, and checking) by selecting appropriate radio buttons in the Load data portion of the GUI and then clicking Load Data
The loaded data is plotted on the plot region.
Generate an initial FIS model or load an initial FIS model using the options in the Generate FIS portion of the GUI
View the FIS model structure once an initial FIS has been generated or loaded by clicking the Structure button
Choose the FIS model parameter optimization method: backpropagation or a mixture of backpropagation and least squares (hybrid method)
Choose the number of training epochs and the training error tolerance
Train the FIS model by clicking the Train Now button
This training adjusts the membership function parameters and plots the training (and/or checking data) error plot(s) in the plot region.
View the FIS model output versus the training, checking, or testing data output by clicking the Test Now button
This function plots the test data against the FIS output in the plot region.
You can also use the ANFIS Editor GUI menu bar to load an FIS training initialization, save your trained FIS, open a new Sugeno system, or open any of the other GUIs to interpret the trained FIS model.
To start training an FIS using either anfis or the ANFIS Editor GUI, first you need to have a training data set that contains desired input/output data pairs of the target system to be modeled. Sometimes you also want to have the optional testing data set that can check the generalization capability of the resulting fuzzy inference system, and/or a checking data set that helps with model overfitting during the training. The use of a testing data set and a checking data set for model validation are discussed in Model Validation Using Checking and Testing Data Sets. As we mentioned previously, overfitting is accounted for by testing the FIS trained on the training data against the checking data, and choosing the membership function parameters to be those associated with the minimum checking error if these errors indicate model overfitting. You will have to examine your training error plots fairly closely in order to determine this. These issues are discussed later in an example. Usually these training and checking data sets are collected based on observations of the target system and are then stored in separate files.
Note Any data set you load into the ANFIS Editor GUI, (or that is applied to the command-line function anfis) must be a matrix with the input data arranged as vectors in all but the last column. The output data must be in the last column. |
| Constraints of anfis | ANFIS Editor GUI Example 1: Checking Data Helps Model Validation | ![]() |
© 1994-2005 The MathWorks, Inc.