Membership function type in genfis2
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Fuzzy Logic Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!