In DirectLiNGAM, regression coefficients were not calculated correctly when calculating residuals. In order to calculate the correct regression coefficient, the variance should be based on np.cov, not np.var in the denominator (or the bias option in np.cov in the numerator should be set to True).
In
DirectLiNGAM
, regression coefficients were not calculated correctly when calculating residuals. In order to calculate the correct regression coefficient, the variance should be based onnp.cov
, notnp.var
in the denominator (or thebias
option innp.cov
in the numerator should be set to True).