Error in EVALFIS_ Fuzzy Logic Toolbox
1 回表示 (過去 30 日間)
古いコメントを表示
Dear Coder,
Upon perform fuzzy inference calculations, MATLAB throw the following error
Error using evalfismex
Illegal parameters in fisGeneralizedBellMf() --> a = 0
May someone shed some light about this particular warning/error.
The mock mock data and code are as below.
Thanks in advances
load('help_FL.mat');
RADIUS = 0.01;
C1 = cat(1,LabelTest,LabelTrain);
C2 = cat(1,FeatureTest,FeatureTrain);
% Fc=FeatureTrain;FeatureTest;
AllData=[C2,C1];
TrainData=[FeatureTrain,LabelTrain];
TestData=[FeatureTest,LabelTest];
cccc=[min(AllData); max(AllData)];
% GENFIS2 Generates a Sugeno-type FIS using subtractive clustering.
% fis = genfis2(FeatureTrain, LabelTrain, RADIUS, [min(AllData); max(AllData)]);
fis = genfis(FeatureTrain, LabelTrain);
% ANFIS Adaptive Neuro-Fuzzy training of Sugeno-type FIS.
[trainFis, trainError, stepSize, checkFis, checkError] = ...
anfis(TrainData, fis, 3, [], TestData);
% Perform fuzzy inference calculations
trainFisOut = round(evalfis(double(FeatureTest), trainFis));
trainRMSE = norm(trainFisOut - LabelTest) / sqrt(length(trainFisOut));
badTrainFis = size(find((trainFisOut == LabelTest) == 0), 1);
% Perform fuzzy inference calculations
checkFisOut = round(evalfis(FeatureTest, checkFis));
checkRMSE = norm(checkFisOut - LabelTest) / sqrt(length(checkFisOut));
badCheckFis = size(find((checkFisOut == LabelTest) == 0), 1);
fprintf('Training: %d (%.2f%%)\n', ...
badTrainFis, badTrainFis / size(TestData, 1) * 100);
fprintf('Valid: %d (%.2f%%)\n', ...
badCheckFis, badCheckFis / size(TestData, 1) * 100);
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!