From b1141226546926c99a0f09a3bfeecda6ced8ca4a Mon Sep 17 00:00:00 2001 From: vbcwonderland Date: Tue, 21 May 2024 15:38:34 -0400 Subject: [PATCH 1/2] Update getLocalIndependenceFacts to check on independence. --- .../src/main/java/edu/cmu/tetrad/search/MarkovCheck.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java index 510e043ed2..d6c23af2bc 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java @@ -231,7 +231,8 @@ public List getLocalIndependenceFacts(Node x) { // Make a new MsepTest based on the true graph. MsepTest msepTest = new MsepTest(graph); IndependenceResult testRes = msepTest.checkIndependence(x, y, parents); - if (testRes.isValid()) factList.add(testRes.getFact()); +// if (testRes.isValid()) factList.add(testRes.getFact()); + if (testRes.isIndependent()) factList.add(testRes.getFact()); } return factList; } From aae647c4695a8c912b2159a67aadf9c91b158351 Mon Sep 17 00:00:00 2001 From: vbcwonderland Date: Tue, 21 May 2024 15:42:19 -0400 Subject: [PATCH 2/2] nit: remove comment. --- tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java | 1 - 1 file changed, 1 deletion(-) diff --git a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java index d6c23af2bc..5fe9a7b82b 100644 --- a/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java +++ b/tetrad-lib/src/main/java/edu/cmu/tetrad/search/MarkovCheck.java @@ -231,7 +231,6 @@ public List getLocalIndependenceFacts(Node x) { // Make a new MsepTest based on the true graph. MsepTest msepTest = new MsepTest(graph); IndependenceResult testRes = msepTest.checkIndependence(x, y, parents); -// if (testRes.isValid()) factList.add(testRes.getFact()); if (testRes.isIndependent()) factList.add(testRes.getFact()); } return factList;