causally.scm.context.SCMContext.unfaithful_model

SCMContext.unfaithful_model(p_unfaithful: float)

Make the assumption of model with distribution unfaithful to the graph.

Unfaithful distribution are modeled via directed paths canceling. In practice, we identify the fully connected triplets of nodes \(X_i \rightarrow X_k \leftarrow X_j \leftarrow X_i\) in the ground truth, and we adjust the causal mechanisms such that the direct effect of \(X_i\) on \(X_k\) cancels out. As an example, consider a graph \(\mathcal{G}\) with vertices \(X_1, X_2, X_3\). We allow for mixed linear and nonlinear mechanisms, and define the set of structural equations as:

\[\begin{split}& X_1 := U_1,\\ & X_2 := f(X_1) + U_2,\\ & X_3 := f(X_1) - X_2 + U_3,\end{split}\]

with \(f\) nonlinear function. This definition of the mechanisms on \(X_3\) cancels out \(f(X_1)\) in the structural equation.

Parameters:

p_unfaithful (float) – Probability of unfaitfhul conditional independence in the presence of a fully connected triplet. The value provided must be in the range (0, 1].

Notes

Unfaithfulness of the distribution is not supported for the post-nonlinear model.