Currently I have been trying to find some good algorithms for feature selection. Using correlation or other non casual type of method will not be the right way to do a feature selection. I'm am searching for aglorithms in python or libraries that use casual effects for feature selection. Currently there are only for binary outcomes, I'm searching for a regression problem so it must be continuous.

"Causality-Guided Feature Selection"

  • $\begingroup$ What exactly do you mean saying „causal“? Does Ridge/Lasso count as non-causal? $\endgroup$
    – Peter
    Nov 8, 2021 at 20:47
  • $\begingroup$ @Peter Unfortunately not, Ridge and Lasso doesn't explain casuality. What I mean by my question is the following: Y = aX + bZ => for sipmplicity let's take they are linear Does X explain Y ? Does Z explain Y? Does Z explain Y through X? Or does Y explain X or Z than the model is literally off. I want to respond to these questions, not just by using correlation which is false. $\endgroup$ Nov 12, 2021 at 15:05
  • $\begingroup$ Geri, are you able to use Granger causality test? Or maybe the predictive power score? towardsdatascience.com/… $\endgroup$
    – Brixx
    Nov 12, 2021 at 15:56
  • $\begingroup$ Granger causality is for time series data en.wikipedia.org/wiki/Granger_causality. I‘m not aware that there is a test etc to detect causality in the narrow sense. So when you mean „identification“ and not only „exogenous variation“ when you speak about causality, things get little messy fmwww.bc.edu/EC-P/wp957.pdf $\endgroup$
    – Peter
    Nov 12, 2021 at 19:34
  • $\begingroup$ Does the Paul Holland's motto given in this question stats.stackexchange.com/questions/2245/… answer your question? $\endgroup$
    – Valentas
    Nov 13, 2021 at 8:17

1 Answer 1


The best resource I've found for ready-made causal inference implementations is this Github repository. I've personally used R and Python implementations of Tetrad to create a graph of the features, and then code an additional step to get variables within the Markov Boundary with respect to the target variable for feature selection. You could also use variants of the PC algorithm to achieve the same thing. There's also this review paper that outlines a lot of the algorithms for different cases.

  • $\begingroup$ Thank you. The PC algorithm is a partial response for me (no pun intended). So I will keep working on this and keep you posted $\endgroup$ Nov 15, 2021 at 9:25

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.