def test_fine_tuned_modularity_seed(self): community_array = fine_tuned_clustering_q(self.G, seed=2) computed_metric = modularity_r(self.adj, community_array, np.unique(community_array)) assert_equal(round(computed_metric, 4), 0.4198)
def test_fine_tuned_modularity_r(self): community_array = fine_tuned_clustering_q(self.G, r=2.0, seed=100) computed_metric = modularity_r(self.adj, community_array, np.unique(community_array), r=2.0) assert_equal(round(computed_metric, 4), 0.5148)
def test_fine_tuned_modularity_method3(self): community_array = fine_tuned_clustering_q(self.G, evd_method='lobpcg', seed=100) computed_metric = modularity_r(self.adj, community_array, np.unique(community_array)) assert_equal(round(computed_metric, 4), 0.4198)
def test_fine_tuned_modularity_2(self): community_array = fine_tuned_clustering_q(self.G, normalize=False, r=2, evd_method='lobpcg', seed=2) computed_metric = modularity_r(self.adj, community_array, np.unique(community_array), r=2) assert_equal(round(computed_metric, 4), 0.5153)