Feature importance: t-value vs coefficients I am estimating a logistic regression and I would like to know the feature importance of each variable. As far as I know, there are two possible ways to get it:

*

*Estimate a logistic regression with normalized variables and compare the coefficients of each one, especially in terms of relative weight: beta_1 / sum(beta_1, ..., beta_n).

*Get the t-value of each variable and, as in step above, calculate the relative weight of each t-value.

Obviously, the results are not the same comparing both methodologies, and I wonder why it is.
In a conceptual sense, I guess the coefficients indicate how would the output change given a variation on a specific variable.
But, how should I interpret the result gotten by calculating the relative weight of each t-value?
And, beyond that, if I want to know how each variable contribute to the final score (like SHAP values), what methodology should I use?


Obviously, the results are not the same comparing both methodologies, and I wonder why it is.

Well for one thing, the former is constrained to be between 0 and 1 (assuming you take the absolute value of the coefficients in the denominator), and the latter is supported on the real line.
Frankly, I think each of the ways listed here isn't great.  Your approaches suffer from the important drawback that each coefficient may be in different units  This can artificially inflate the coefficient which is often why the covariates are scaled prior to fitting the model.  This makes the relative effects of the scaled variables more or less comparable. Additionally, the z value approach (logistic regression uses z values for reasons we won't get into here) can be especially misleading because it depends on the precision of the estimate and the amount of data you have.  Small effects can have large z value by virtue of having lots of data.
Were I to suggest a method for answering "which feature is most important" I might scale my variables so then the coefficients are interpreted as the change in the log odds when the predictor changes by one standard deviation.

And, beyond that, if I want to know how each variable contribute to the final score (like SHAP values), what methodology should I use?

Since logistic regression is a linear model (linear in the log odds), you may find it favorable to read up on SHAP values for linear models. The linearity makes the interpretation very easy.
