フィルターのクリア

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 Center および File ExchangeFuzzy Logic Toolbox についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by