8
$\begingroup$

I have read this question: How do i interpret the output of XGBoost importance? about the three different types of feature importances: frequency (called "weight" in Python XGBoost), gain, and cover.

In my case, I have a feature, Gender, that has a very low importance based on the frequency metric, but is the most important feature by far based on both the gain, and cover metrics.

I know gender should be important for what I'm predicting. If I plot only gender vs. the target, there is a clear correlation. I am not surprised that it's the most important feature. I just want to know why it's not considered an important feature based on the frequency metric.

$\endgroup$

1 Answer 1

9
$\begingroup$

I just want to know why it's not considered an important feature based on the frequency metric.

Most likely, the variable gender has much smaller number of possible values (often only two: male/female or 0/1, depending on the representation) compared to other predictors in your dataset.

If gender is just binary in your case, it means that it can be used at most once in each tree, while, let say, age might appear much more often on different levels of the trees.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.