필터 지우기
필터 지우기

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 (최근 30일)
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;

답변 (1개)

Shreeya
Shreeya 2023년 9월 6일
편집: Shreeya 2023년 9월 6일
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.!

카테고리

Help CenterFile Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by