Error in EVALFIS_ Fuzzy Logic Toolbox

1 vue (au cours des 30 derniers jours)
balandong
balandong le 27 Mar 2019
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);

Réponses (0)

Catégories

En savoir plus sur Fuzzy Logic Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by