Azzera filtri
Azzera filtri

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 visualizzazioni (ultimi 30 giorni)
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;

Risposte (1)

Shreeya
Shreeya il 6 Set 2023
Modificato: Shreeya il 6 Set 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.!

Categorie

Scopri di più su Fuzzy Logic Toolbox in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by