Skip to Main Content Skip to Search
Product Documentation

anfis - Training routine for Sugeno-type Fuzzy Inference System (MEX only)

Syntax

[fis,error,stepsize] = anfis(trnData)
[fis,error,stepsize] = anfis(trnData,initFis) 
[fis,error,stepsize] = anfis(trnData,numMFs) 
[fis,error,stepsize,chkFis,chkErr] = ...
 anfis(trnData,initFis,trnOpt,dispOpt,chkData,optMethod) 
[fis,error,stepsize,chkFis,chkErr] = ...
 anfis(trnData,numMFs,trnOpt,dispOpt,chkData,optMethod) 

Description

This syntax is the major training routine for Sugeno-type fuzzy inference systems. anfis uses a hybrid learning algorithm to identify parameters of Sugeno-type fuzzy inference systems. It applies a combination of the least-squares method and the backpropagation gradient descent method for training FIS membership function parameters to emulate a given training data set. anfis can also be invoked using an optional argument for model validation. The type of model validation that takes place with this option is a checking for model overfitting, and the argument is a data set called the checking data set.

The arguments in the description for anfis are as follows. Note that you can specify the arguments trnOpt, dispOpt, chkData, and optMethod as empty, [], when necessary:

The training process stops whenever the designated epoch number is reached or the training error goal is achieved.

The range variables in the previous description for anfis are as follows:

anfis has certain restrictions (see Constraints of anfis for more information).

Examples

x = (0:0.1:10)';
y = sin(2*x)./exp(x/5);
trnData = [x y];
numMFs = 5;
mfType = 'gbellmf';
epoch_n = 20;
in_fis = genfis1(trnData,numMFs,mfType);
out_fis = anfis(trnData,in_fis,20);
plot(x,y,x,evalfis(x,out_fis));
legend('Training Data','ANFIS Output');

References

Jang, J.-S. R., "Fuzzy Modeling Using Generalized Neural Networks and Kalman Filter Algorithm," Proc. of the Ninth National Conf. on Artificial Intelligence (AAAI-91), pp. 762-767, July 1991.

Jang, J.-S. R., "ANFIS: Adaptive-Network-based Fuzzy Inference Systems," IEEE Transactions on Systems, Man, and Cybernetics, Vol. 23, No. 3, pp. 665-685, May 1993.

See Also

anfisedit | genfis1

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS