| Fuzzy Logic Toolbox | ![]() |
Generate an FIS structure from data without data clustering.
Syntax
Description
genfis1 generates a Sugeno-type FIS structure used as initial conditions (initialization of the membership function parameters) for anfis training.genfis1(data, numMFs, inmftype, outmftype) generates a FIS structure from a training data set, data, using a grid partition on the data (no clustering).
The arguments for genfis1 are as follows:
data is the training data matrix, which must be entered with all but the last columns representing input data, and the last column representing the single output.
numMFs is a vector whose coordinates specify the number of membership functions associated with each input. If you want the same number of membership functions to be associated with each input, then it suffices to make numMFs a single number.
inmftype is a string array in which each row specifies the membership function type associated with each input. Again, this can be a one-dimensional single string if the type of membership functions associated with each input is the same.
outmftype is a string that specifies the membership function type associated with the output. There can only be one output, since this is a Sugeno-type system. The output membership function type must be either linear or constant.
The number of membership functions associated with the output is the same as the number of rules generated by genfis1. The default number of membership functions, numMFs, is 2; the default input membership function type is 'gbellmf'; and the default output membership function type is 'linear'. These are used whenever genfis1 is invoked without the last three arguments.
Examples
data = [rand(10,1) 10*rand(10,1)-5 rand(10,1)]; numMFs = [3 7]; mfType = str2mat('pimf','trimf'); fismat = genfis1(data,numMFs,mfType); [x,mf] = plotmf(fismat,'input',1); subplot(2,1,1), plot(x,mf); xlabel('input 1 (pimf)'); [x,mf] = plotmf(fismat,'input',2); subplot(2,1,2), plot(x,mf); xlabel('input 2 (trimf)');
![]()
See Also
| gbellmf | genfis2 | ![]() |