Error using Genfis function in ANFIS

5 次查看(过去 30 天)
I have the data set of daily price of 8 fuels types like as Heating Oil, Brent, Methanol and so on from 7.11.2002 to 7.11.2022.
Now I would like to predict their day prices for the coming days. For example, for Brent fuel, I want to apply ANFIS for predction of daily price. I have the daily price of the 20 years in the Excel file (I sent its image in the attachment below). I want to predict the daily price of this fuel for the upcoming 60 days after the last day (7.11.2022). I considered the $80%$ of data as training data and the rest of them as the testing data. Moreover, I considered one input data which is a matrix with two column. First column shows the number of index of the day's number and the second column shows the value of daily price.
When I use the "Generate FIS", I encounter the Error: "Xout must be finite".
How can I solve ths Error? Should I make change in the stucture of my inpit data?
Thanks a lot.

回答(1 个)

Govind KM
Govind KM 2024-10-14
Hi Zeinab,
The error seems to be due to some NaN or Inf values present in the output data argument being passed to the genfis function. Finiteness of data can be checked using the mustBeFinite function:
%Replace outputData with the name of the data being passed as the second
%argument to genfis
mustBeFinite(outputData)
More information about the mustBeFinite function can be found in the documentation:
Hope this is helpful!

类别

Help CenterFile Exchange 中查找有关 Fuzzy Logic Toolbox 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by