How can I identify the most important independent variable in an equation?
Ältere Kommentare anzeigen
Help! I have this equation. I would like to know the contribution of each independent variables to the dependent variable (for identifying the most important independent variable). Is this possible in MATLAB?
I tried doing this by taking the partial derivative of the equation with respect to each independent variable, but I am not sure how to identify which independent variable is most important/dominant.
syms x y z
f=sqrt(((x+y+y*z)-sqrt((x+y+y*z)^2-4*x*y*z))/((1+y+y*z)-sqrt((1+y+y*z)^2-4*y*z)));
gradient(f,[x y z])
This is the results:
ans =
-((2*x + 2*y - 2*y*z)/(2*((x + y + y*z)^2 - 4*x*y*z)^(1/2)) - 1)/(2*((x + y + y*z - ((x + y + y*z)^2 - 4*x*y*z)^(1/2))/(y + y*z - ((y + y*z + 1)^2 - 4*y*z)^(1/2) + 1))^(1/2)*(y + y*z - ((y + y*z + 1)^2 - 4*y*z)^(1/2) + 1))
((z + (4*x*z - 2*(z + 1)*(x + y + y*z))/(2*((x + y + y*z)^2 - 4*x*y*z)^(1/2)) + 1)/(y + y*z - ((y + y*z + 1)^2 - 4*y*z)^(1/2) + 1) - ((z + (4*z - 2*(z + 1)*(y + y*z + 1))/(2*((y + y*z + 1)^2 - 4*y*z)^(1/2)) + 1)*(x + y + y*z - ((x + y + y*z)^2 - 4*x*y*z)^(1/2)))/(y + y*z - ((y + y*z + 1)^2 - 4*y*z)^(1/2) + 1)^2)/(2*((x + y + y*z - ((x + y + y*z)^2 - 4*x*y*z)^(1/2))/(y + y*z - ((y + y*z + 1)^2 - 4*y*z)^(1/2) + 1))^(1/2))
((y + (4*x*y - 2*y*(x + y + y*z))/(2*((x + y + y*z)^2 - 4*x*y*z)^(1/2)))/(y + y*z - ((y + y*z + 1)^2 - 4*y*z)^(1/2) + 1) - ((y + (4*y - 2*y*(y + y*z + 1))/(2*((y + y*z + 1)^2 - 4*y*z)^(1/2)))*(x + y + y*z - ((x + y + y*z)^2 - 4*x*y*z)^(1/2)))/(y + y*z - ((y + y*z + 1)^2 - 4*y*z)^(1/2) + 1)^2)/(2*((x + y + y*z - ((x + y + y*z)^2 - 4*x*y*z)^(1/2))/(y + y*z - ((y + y*z + 1)^2 - 4*y*z)^(1/2) + 1))^(1/2))
How should I go about this? Is there another way to do this? Thank you in advance.
2 Kommentare
Yazan
am 30 Jun. 2021
Do you know where this function is defined? Namely, the (x, y, z) domain over which your function exists. If yes, then plot the partial derivatives and compare their magnitudes. I have not analyzed your function, but generally, the importance of each variable in defining the rate of change of a function may change over its domain.
dpb
am 30 Jun. 2021
Unless you standardize the inputs, the magnitudes of the partial derivatives will be dependent upon the scale of the various variables and so won't mean anything in comparsion to each other.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Tuning Goals finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!