use of edu.cmu.tetrad.search.IndTestGSquare in project tetrad by cmu-phil.
the class TestIndTestGSquare method testIsIndependent.
@Test
public void testIsIndependent() {
try {
DataSet dataSet = getDataSet(1);
IndTestGSquare test = new IndTestGSquare(dataSet, 0.05);
List<Node> v = test.getVariables();
Node x = v.get(0);
Node y = v.get(1);
ArrayList<Node> z = new ArrayList<>();
z.add(v.get(2));
assertTrue(test.isIndependent(x, y, z));
test.setDeterminationP(0.99);
assertFalse(test.determines(z, x));
assertFalse(test.determines(z, y));
} catch (IOException e) {
// To change body of catch statement use File | Settings | File Templates.
e.printStackTrace();
}
}
use of edu.cmu.tetrad.search.IndTestGSquare in project tetrad by cmu-phil.
the class TestIndTestGSquare method testDetermination.
@Test
public void testDetermination() {
try {
DataSet dataSet = getDataSet(1);
IndTestGSquare test = new IndTestGSquare(dataSet, 0.05);
Node x = dataSet.getVariable("X4");
ArrayList<Node> z = new ArrayList<>();
test.setDeterminationP(0.99);
assertFalse(test.determines(z, x));
} catch (IOException e) {
// To change body of catch statement use File | Settings | File Templates.
e.printStackTrace();
}
}
Aggregations