ANFIS Adaptive Neuro-Fuzzy training of Sugeno-type FIS.
ANFIS uses a hybrid learning algorithm to identify the membership
function parameters of single-output, Sugeno type fuzzy inference
systems (FIS). A combination of least-squares and backpropagation
gradient descent methods are used for training FIS membership function
parameters to model a given set of input/output data.
[FIS,ERROR,STEPSIZE] = ANFIS(TRNDATA) tunes the FIS parameters using
the input/output training data stored in TRNDATA. For an FIS with N
inputs, TRNDATA is a matrix with N+1 columns where the first N columns
contain data for each FIS input and the last column contains the output
data. The number of rows (data points) of TRNDATA must be less than
intmax. ERROR is the array of root mean square training errors
(difference between the FIS output and the training data output) at
each epoch. ANFIS uses GENFIS to create a default FIS that is used as
the starting point for ANFIS training. ANFIS uses the default option
values returned by ANFISOPTIONS function.
[FIS,ERROR,STEPSIZE] = ANFIS(TRNDATA,OPTIONS) creates an FIS using the
specified OPTIONS returned by ANFISOPTIONS function. For more
information on creating options, see ANFISOPTIONS function. STEPSIZE is
an array of step sizes used at each training epoch. The step size is
increased or decreased by multiplying it by the step size increase or
decrease rate specified in OPTIONS.
[FIS,ERROR,STEPSIZE,CHKFIS,CHKERROR] = ANFIS(TRNDATA,OPTIONS) creates
an FIS using the specified OPTIONS returned by ANFISOPTIONS function.
If OPTIONS includes validation data for preventing overfitting of the
training data, then ANFIS returns validation results in CHKFIS and
CHKERROR. CHKFIS is the snapshot FIS taken when the validation data
error reaches a minimum. CHKERROR is the array of the root mean
squared, validation data errors at each epoch.
x = (0:0.1:10)';
y = sin(2*x)./exp(x/5);
options = genfisOptions('GridPartition');
options.NumMembershipFunctions = 5;
in_fis = genfis(x,y,options);
options = anfisOptions;
options.InitialFIS = in_fis;
options.EpochNumber = 20;
out_fis = anfis([x y],options);
legend('Training Data','ANFIS Output');
See also ANFISOPTIONS, GENFIS, NEUROFUZZYDESIGNER
Documentation for anfis