Feature importance of a polynomial function

조회 수: 7 (최근 30일)
Jahetbe
Jahetbe 2022년 12월 7일
편집: Jahetbe 2022년 12월 7일
Hi everyones
I used machien learning models to develop the following equation as the optimum one for my problem.
Y= a*(x1^b)(x2^c)(x3^d)+e*(x1^f)(x2^g)(x3^h)
I want to calculate the importance of X1, X2, X3 in Y calcualtion based on the above-mentioned equation. in the form of percentage. For example, the importance of X1, X2, and X3 are 37.5%, 45.3%, and 17.2% (the sum of all importances is equal to one).
How can I calcualte the importance of each feture?
Thnaks in advanced.

답변 (1개)

C B
C B 2022년 12월 7일
To calculate the importance of each feature in the equation you provided, you can use the coefficients of the equation to determine the contribution of each feature to the predicted output. Since the equation includes exponentiated terms for each feature, you can use the absolute value of the coefficients for each exponentiated term as a measure of the importance of that feature.
For example, in the equation Y = a*(x1^b)(x2^c)(x3^d)+e*(x1^f)(x2^g)(x3^h), the importance of x1 can be calculated as follows:
importance_x1 = abs(a*b) + abs(e*f);
Similarly, the importance of x2 and x3 can be calculated using the coefficients c and d for the first term, and the coefficients g and h for the second term:
importance_x2 = abs(a*c) + abs(e*g);
importance_x3 = abs(a*d) + abs(e*h);
Once you have calculated the importance of each feature, you can normalize the values by dividing them by the sum of all importances to obtain a percentage. For example:
importance_x1_percent = (abs(a*b) + abs(e*f)) / (abs(a*b) + abs(a*c) + abs(a*d) + abs(e*f) + abs(e*g) + abs(e*h));
importance_x2_percent = (abs(a*c) + abs(e*g)) / (abs(a*b) + abs(a*c) + abs(a*d) + abs(e*f) + abs(e*g) + abs(e*h));
importance_x3_percent = (abs(a*d) + abs(e*h)) / (abs(a*b) + abs(a*c) + abs(a*d) + abs(e*f) + abs(e*g) + abs(e*h));
Note that this is just an example, and you may need to modify the code depending on your specific equation and requirements. You may also want to consider other factors, such as the range of values for each feature and the impact of scaling on the importance of each feature. For more information and detailed instructions, please consult a specialist in machine learning and feature importance.
  댓글 수: 2
Torsten
Torsten 2022년 12월 7일
I doubt this can be correct because the independent variables (x1,x2,x3) can be scaled very differently.
Jahetbe
Jahetbe 2022년 12월 7일
편집: Jahetbe 2022년 12월 7일
Thank you for your response.
As you know, this equation is just an example. We can have different types of equations.
If you could provide some reference to prove that it's the best way, It can be more helpful.
I need a reliable method that can scientifically demonstrate its performance in calculating the importance of each feature.
Regards

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by