cdt15 / lingam

Python package for causal discovery based on LiNGAM.
https://sites.google.com/view/sshimizu06/lingam
MIT License
372 stars 56 forks source link

Regression coefficients are incorrect when calculating residuals in DirectLiNGAM #141

Closed ikeuchi-screen closed 3 months ago

ikeuchi-screen commented 3 months ago

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).