Effacer les filtres
Effacer les filtres

Error fuzzy.inte​rnal.utili​ty.evalfis Input data must have as many columns as input variables and as many rows as independent sets of input values

3 vues (au cours des 30 derniers jours)
I have a fis model with 3 inputs and 1 output. I want to evaluate it with Evalfis. However I am getting Error.
[varargout{1:nargout}] = fuzzy.internal.utility.evalfis(varargin{:});
fileName = 'Car-Prices-Data-Impl.csv';
myData = importdata(fileName,";",1);
inputRead = myData.data(1:end, [1 3]);
output = myData.data(1:end,end);
myModel = 'car_price.fis';
fis=readfis(myModel);
predictedOutput = evalfis(fis,inputRead);
%RMSE = sqrt (mean((predictedOutput-output).^2));
RMSE2 = rms(predictedOutput - output);
"RMSE Value : " + RMSE2;

Réponses (1)

Shreeya
Shreeya le 6 Sep 2023
Modifié(e) : Shreeya le 6 Sep 2023
I understand that you are receiving an error while using “evalfis”. The documentation states that when calling “evalfis(fis, input)”, input is an M-by-Nu vector where Nu is the number of input variables in "fis".
As I can see in your code line number 3, the number of features in 'inputRead' are not equal to the number of features in 'fis'. This could potentially be causing the error. Rectify the dimensions and run the code again to see if the error is resolved.
Refer to the documentation for more details: https://in.mathworks.com/help/fuzzy/evalfis.html#d124e30118
Hope the provided information helps in resolving your query.!

Catégories

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

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by