CausalDiscoveryToolbox
CausalDiscoveryToolbox copied to clipboard
[BUG] ANM + predict_proba method return has wrong
Encountering a bug while using this package may occur. In order to fix the said bug and improve all users’ experience, it is highly recommended to submit a bug report on the GitHub issue tracker: https://github.com/FenTechSolutions/CausalDiscoveryToolbox/issues
Describe the bug The predict_proba method that in ANM, it said:" 1 if a->b and -1 b->a), so the return statement why is anm_score(b, a) - anm_score(a, b). Why not is anm_score(a, b) - anm_score(b, a).
Please mention
- My cdt package version is the newest.
- My Python version is 3.8.
- My PyTorch package version is 1.8.1.
- My GPU is GTX1050, is available.
- The full traceback of the raised error if one is raised.
- A small code snippet to reproduce the bug if the description is not explicit.
-
The ANM score for direction a->b
(anm_score(a, b)
) is the independence test statistic between a
and residuals, and lower value = more likely independent (section 3 here) = more likely a->b
. In that sense, if a->b
is the true direction then anm_score(a, b)
should be low and anm_score(b, a)
should be high, hence anm_score(b, a) - anm_score(a, b)
should be positive. Therefore the implementation is not wrong in this case.
What about this situation: no edge between X and Y,does the anm_score(x, y) will return 0?
Hello ! Sorry for the late answer ; yes ; if there is no edge between X and Y the score is theoretically 0. In the real case, the value is close to 0.
Best, Diviyan