causally.scm.causal_mechanism.LinearMechanism

class causally.scm.causal_mechanism.LinearMechanism(min_weight: float = -1.0, max_weight: float = 1.0, min_abs_weight: float = 0.05)

Linear causal mechanism by linear regression.

Parameters:
  • min_weight (float, default -1) – Minimum value for the coefficients of the linear mechanisms.

  • max_weight (float, default 1) – Maximum value for the coefficients of the linear mechanisms.

  • min_abs_weight (float, default 0.05) – Smallest allowed absolute value of any linear mechanism coefficient. Low value of min_abs_weight potentially lead to lambda-unfaithful distributions.

Methods

predict(X)

Apply a linera transformation on X.