How to add some layers to ANFIS using Matlab toolbox?

7 visualizzazioni (ultimi 30 giorni)
I am looking to make a deep ANFIS with some hidden layers between fuzzification and defuzzification layers. In fact, I want to insert a feedforward DNN in ANFIS structure. How can I do this, especially, by using Matlab toolbox?

Risposte (1)

Sam Chak
Sam Chak il 3 Feb 2023
The conventional ANFIS architecture has 5 layers that combines the elements of Adaptive Control, Neural nets, and Fuzzy system. I'd suggest that you look into and study the anfis() code and then customize how you want to insert a feedforward DNN between the fuzzification and defuzzification layers.
help anfis
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. Example 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); plot(x,y,x,evalfis(out_fis,x)); legend('Training Data','ANFIS Output'); See also ANFISOPTIONS, GENFIS, NEUROFUZZYDESIGNER Documentation for anfis doc anfis

Categorie

Scopri di più su Fuzzy Logic Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by