1
$\begingroup$

After fitting a decision tree with some continuous variable, how do I interpret the effect that variable has on the target?

For example I'm predicting target Y. From sklearn random forest or Xgboost I can find out that the feature X is important. How do I determine if feature X's correlation to Y is positive or negative?

$\endgroup$

1 Answer 1

1
$\begingroup$

Calculate the Pearson correlation coefficient or the Spearman rank correlation coefficient between feature X and target Y. The correlation coefficient quantifies the direction and strength of the linear or monotonic relationship between the two variables.

A positive correlation coefficient indicates a positive relationship between feature X and the target Y, while a negative correlation coefficient suggests a negative relationship. The magnitude of the coefficient indicates the strength of the relationship.

$\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.