Membership function type in genfis2

1 Ansicht (letzte 30 Tage)
Mhmmd Sjj
Mhmmd Sjj am 25 Apr. 2021
Bearbeitet: Mhmmd Sjj am 25 Apr. 2021
I have trained 2 anfis sets in matlab.One of them has been trained with "genfis1" function which uses "grid partitioning" and the other has been trained with "genfis2" function which uses"Subtractive clustering" method.The question is that I do not know how to change input membership functions type in "genfis2" function.I have read matlab document about "genfis2" but it did not mention anything about how to give the "genfis2" our desired membership function type.It has been written it matlab document that the default membership function type for inputs is "gaussmf".How could I Change the input membership functions type?
The following is my main script:
L1 = 3;
L2 = 5;
n = 80;
teta1 = linspace(0,pi/2,n);
teta2 = 0:pi/100:pi;
[TETA1,TETA2] = meshgrid(teta1,teta2) ;
x = L1*cos(TETA1)+L2*cos(TETA2);
y = L1*sin(TETA1)+L2*sin(TETA2);
X = x(:);
Y = y(:);
TETA1 = TETA1(:);
TETA2 = TETA2(:);
%% Create And TRAIN First ANFIS With GENFIS1
numMfs = [4 3];
InMfsType = char('gaussmf','trimf');
OutMfsType = 'constant';
Data1 = [X,Y,TETA1];
fis1 = genfis1(Data1,numMfs,InMfsType,OutMfsType);
EpochNumber = 20;
Error = 0.001;
StepSize = 0.035;
StepSizeIncreaseRate = 0.9;
StepSizeDecreaseRate = 1.1;
TrnOpt = [EpochNumber,...
StepSize,...
StepSizeDecreaseRate,...
StepSizeIncreaseRate,...
Error];
fis1 = anfis(Data1,fis1,TrnOpt);
%% Create And TRAIN Second ANFIS
Data2 = [X,Y,TETA2];
fis2 = genfis1(Data2,[5,4],'trapmf','constant');
fis2 = anfis(Data2,fis2,TrnOpt);

Antworten (0)

Kategorien

Mehr zu Fuzzy Logic Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by