Additive noise models
Causal discovery based on the additive noise models (ANM ). If you would like to apply the method to more than two variables, we suggest you first apply the PC algorithm and then use pair-wise analysis in this implementation to find the causal directions that cannot be determined by PC.
from causallearn.search.FCMBased.ANM.ANM import ANM anm = ANM() p_value_foward, p_value_backward = anm.cause_or_effect(data_x, data_y)
data_x: input data (n, 1).
data_y: output data (n, 1).
pval_forward: p value in the x->y direction.
pval_backward: p value in the y->x direction.