1

I've recently started using the bnlearn package in R for detecting Markov Blankets of a target node in the dataset.

Based on my understanding of Bayesian Inference, two nodes are connected if there is a causal relationship between the two and this is measured using some conditional independence tests to check for correlation while taking into account potential confounders.

I just wanted to clarify if bnlearn checks for both linear and non-linear correlations in these tests. I tried looking for stuff about this in the documentation for the package but I wasn't able to get anything.

It would be really helpful if someone can explain how bnlearn performs the CI tests.

Thanks a bunch <3

mangoland
  • 13
  • 3
  • It depends. Categorical do but Gaussian BN does not -it is just multiple linear regression. There is nothing in the theory that prohibits modelling non-linearity but assuming linearity allows efficient learning and inference. – user20650 Jun 15 '22 at 15:33
  • @user20650 hmm but they can still find inverse or quadratic relations right? or would it just be wise for me to also test by transforming some variables (taking sqrt or inverse etc) and then checking again? – mangoland Jun 15 '22 at 22:05
  • I have not worked / read on non-linear models -- I should go do that. It is fine to transform the variables; within bnlearn there is an assumption of multivariate-normal, so often transformations of variables are needed. I do not really consider this as non-linear modelling (by non-linear I include polynomials), although implicitly it is. For modelling non-linearities with polynomials; consider the two variable net X -> Y. Where X~N(mu_x, s_x) and Y ~ N(b_0 + b_1*x + b_2*x^2, s_y). So the mean of Y is determined by a quadratic on X. We could draw this net as X1 -> Y <- X2 .... – user20650 Jun 16 '22 at 12:04
  • ... (where X1 is X and X2 is X^2). But that is not sensible, either in structure learning - as we generally do not want to drop the linear term and only keep the quadratic; or in inference - as we want, for example, P(X|Y) not P(X2|Y). So I think some though / reading is needed on how this is done. But as an alternative, for non-linear correlations it may be better to look at copula models (vines) which use rank based correlations, and so can capture non-linear associations. – user20650 Jun 16 '22 at 12:04
  • There is a model closer to the Bayesian networks than the Vines models: the Copula Bayesian Networks (CBN, Elidan2010). This framework uses the same semantics as Bayesian networks (in terms of independence) and proposes the factorization of the joint copula. The otagrum module (https://openturns.github.io/otagrum/master/index.html) implements the learning of such models which allows the factorized representation of any continuous distribution, in particular non-parametric distributions (using Bernstein copulas). – Pierre-Henri Wuillemin Jun 18 '22 at 06:28
  • Hi @Pierre-HenriWuillemi -- every time I see octagrum link I keep meaning to have a go!; Do you have any notes / presentations / vignettes that introduce both the codes but with explanation of the methods used with reference to the relevant literature. Thanks (or is the Elidan2010 link just the place to start) – user20650 Jun 18 '22 at 13:05
  • 1
    Hi, well, there is the nice model (mainly Elidan2010) , there are learning algorithms (Elidan2010) and Lasserre's work : https://mlasserre.github.io/pages/publications.html. There are the sources (based on openturns & agrum) : https://github.com/openturns/otagrum and the documentation of the module : https://openturns.github.io/otagrum/master/index.html ... – Pierre-Henri Wuillemin Jun 18 '22 at 22:59

1 Answers1

0

Correlation implies statistical dependence, but not vice versa. There are cases of statistical dependence where there is no correlation, e.g. in periodic signals (correlation between sin(x) and x is very low for many periods). The concept of statistical dependence is more abstract than correlation and thus the documentation is written differently. As you can see in the example of sin(x) and x: This is indeed a non-linear dependency which should be captured by the Bayesian network.

danlooo
  • 10,067
  • 2
  • 8
  • 22