|
|
@ -103,7 +103,7 @@ class TestStructureEstimator(unittest.TestCase): |
|
|
|
def test_adjacency_matrix(self): |
|
|
|
def test_adjacency_matrix(self): |
|
|
|
se1 = StructureConstraintBasedEstimator(self.s1, 0.1, 0.1) |
|
|
|
se1 = StructureConstraintBasedEstimator(self.s1, 0.1, 0.1) |
|
|
|
se1.ctpc_algorithm() |
|
|
|
se1.ctpc_algorithm() |
|
|
|
adj_matrix = nx.adj_matrix(self.real_net_structure, self.s1.structure.nodes_labels).toarray().astype(bool) |
|
|
|
adj_matrix = nx.adjacency_matrix(self.real_net_structure, self.s1.structure.nodes_labels).toarray().astype(bool) |
|
|
|
self.assertTrue(np.array_equal(adj_matrix, se1.adjacency_matrix())) |
|
|
|
self.assertTrue(np.array_equal(adj_matrix, se1.adjacency_matrix())) |
|
|
|
|
|
|
|
|
|
|
|
def test_save_plot_estimated_graph(self): |
|
|
|
def test_save_plot_estimated_graph(self): |
|
|
|