From c4a8feb75ba40e6566414ede6ce2b964718a0f1d Mon Sep 17 00:00:00 2001 From: Jan Bachmann Date: Wed, 11 Sep 2024 22:05:57 +0300 Subject: [PATCH] Fix homophily order --- netin/models/dh_model.py | 2 +- netin/models/dpah_model.py | 2 +- netin/models/homophily_model.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/netin/models/dh_model.py b/netin/models/dh_model.py index 8a4425e4..83b2c008 100644 --- a/netin/models/dh_model.py +++ b/netin/models/dh_model.py @@ -54,7 +54,7 @@ def _initialize_lfms(self): super()._initialize_lfms() self.h = TwoClassHomophily.from_two_class_homophily( node_class_values=self.graph.get_node_class(CLASS_ATTRIBUTE), - homophily=(self.h_m, self.h_M)) + homophily=(self.h_M, self.h_m)) def compute_target_probabilities(self, source: int)\ -> np.ndarray: diff --git a/netin/models/dpah_model.py b/netin/models/dpah_model.py index 1ffd661b..15b3611e 100644 --- a/netin/models/dpah_model.py +++ b/netin/models/dpah_model.py @@ -58,7 +58,7 @@ def _initialize_lfms(self): super()._initialize_lfms() self.h = TwoClassHomophily.from_two_class_homophily( node_class_values=self.graph.get_node_class(CLASS_ATTRIBUTE), - homophily=(self.h_m, self.h_M)) + homophily=(self.h_M, self.h_m)) self.pa = InDegreePreferentialAttachment( graph=self.graph, N=self._n_nodes_total) diff --git a/netin/models/homophily_model.py b/netin/models/homophily_model.py index 2fec5381..1fd34648 100644 --- a/netin/models/homophily_model.py +++ b/netin/models/homophily_model.py @@ -58,4 +58,4 @@ def compute_target_probabilities(self, source: int) -> np.ndarray: def _initialize_lfms(self): self.h = TwoClassHomophily.from_two_class_homophily( node_class_values=self.graph.get_node_class(CLASS_ATTRIBUTE), - homophily=(self.h_m, self.h_M)) + homophily=(self.h_M, self.h_m))