Membership function type in genfis2

조회 수: 1 (최근 30일)
Mhmmd Sjj
Mhmmd Sjj 2021년 4월 25일
편집: Mhmmd Sjj 2021년 4월 25일
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);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by