No rules fired for Output 1. Defuzzified output value set to its mean range value 2.3873.
22 views (last 30 days)
Show older comments
Someone knows the cause of this warning? and how to solve it?
Warning: No rules fired for Output 1. Defuzzified output value set to its mean range value 2.3873.
> In throwWarning (line 18)
In evalfis (line 93)
Here is my code,
subset = xlsread ('entrenamientoDrastic.csv', 1, 'A1:G420660');
nit = xlsread('nt2006.csv', 1, 'A1:WQ684');
nit = transpose(nit);
nit = reshape(nit,[], 1);
subset(:,7) = ((subset(:, 7)).*nit)/145;
subset = [subset nit];
[subset, ia, ic] = unique(subset,'rows','stable');
%rng('default');
% Cross varidation (train: 70%, test: 30%)
cv = cvpartition(size(subset,1),'HoldOut',0.3);
idx = cv.test;
% Separate to training and test data
train = subset(~idx,:);
test = subset(idx,:);
train_input = train(:, 1:6);
train_output = train(:,7);
test_input = test(:, 1:6);
test_output = test(:, 7);
opt = genfisOptions('FCMClustering','FISType','mamdani');
opt.NumClusters = 10;
opt.Exponent = 8.5;
%opt.Verbose = 2.1;
opt.MaxNumIteration = 100;
opt.MinImprovement = 1e-5;
fis = genfis(train_input,train_output,opt);
% Evaluate FIS
nit = test(:,8);
actY = evalfis(test_input,fis);
% Calculate RMSE
del = actY - test_output;
rmse = sqrt(mean(del.^2));
[rho,pval] = corr(nit,actY,'Type','Spearman');
The rmse gives an Inf value.
0 Comments
Answers (0)
See Also
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!