Does inverse modelling is possible with ANFIS?

2 次查看(过去 30 天)
I have trained an ANFIS model with 2 inputs and 1 output. Now, I want to invert this model, i.e., use the output as input and obtain the original 2 inputs. How can I achieve this in MATLAB? Are there any specific functions or techniques I can use to invert an ANFIS model?

采纳的回答

John D'Errico
John D'Errico 2025-3-23
In general, absolutely no. This is impossible. Why do I say that? Consider even an absolutely trivial linear model. I don't need anything fancy here.
z = x + y
Suppose you estimate that model from some data. I've even been lazy, and given you a very simple result, of some hypotheocal model, with a very boring set of coefficients.
Now your goal will be, given a value of z, what are the values of x and y? For example, z == 3. Now, what were the original values of x and y? It might have been any of (x,y) = (1,2), of (2,1), or (1.5,1.5), or (-7000234,7000237), or infinitely many other choices.
Worse, your model will generally be nonlinear. And that means the inverse will very frequently result in multiple branches.
Essentially, anytime you have more inputs than outputs, then there will be no way to identify a unique inverse. At best, you could fix some of the variables at some arbitrary level, and then use a nonlinear solver (like fsolve) to solve for a solution for the rest of the variables. Even then, there will likely be multiple solutions per my comment above. Or, there may be no solutions at all.
Sorry, but you can't always get what you want. (I'm sure somebody said that before me.)
  4 个评论
Sam Chak
Sam Chak 2025-3-24
@AARTHY, Let's naively assume that your ANFIS system can be represented as a 4th-degree polynomial. Thus, when the output value is 1.47, do you wish to display the input values in the command window in this manner?
p4 = @(k) [1, -258.517, 17688.4426, -228694.0812, 154976.718-k];
output = 1.47;
inputs = roots(p4(output))
inputs = 4×1
152.0000 90.0000 15.8000 0.7170
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
AARTHY
AARTHY 2025-3-25
Thank you all for helping me understand this.Now I understand that I won’t give exact input values

请先登录,再进行评论。

更多回答(0 个)

类别

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

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by