Filter löschen
Filter löschen

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 Ansichten (letzte 30 Tage)
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;

Antworten (1)

Shreeya
Shreeya am 6 Sep. 2023
Bearbeitet: Shreeya am 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.!

Kategorien

Mehr zu Fuzzy Logic Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by