From 37c40edaf83e1249ceb4cb0d891a70d54e53e26b Mon Sep 17 00:00:00 2001 From: Rahul Nair Date: Mon, 6 Jan 2025 14:47:52 +0000 Subject: [PATCH 1/3] Fixes binary incompatibility of numpy/pandas by pinning numpy version Signed-off-by: Rahul Nair --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index eb1101a..a023e80 100644 --- a/setup.py +++ b/setup.py @@ -27,6 +27,7 @@ ], "cofrnet": [ "pandas<2.0.0", + "numpy==1.24.2", "torch", "tqdm", ], From 6e7d126979f3587d7cadd8f03463aa8d4a4c94a2 Mon Sep 17 00:00:00 2001 From: Rahul Nair Date: Mon, 6 Jan 2025 14:59:49 +0000 Subject: [PATCH 2/3] Adding signoff. Signed-off-by: Rahul Nair From f7bcc728f9f6920047f0298605df5c6f9ba9f433 Mon Sep 17 00:00:00 2001 From: Rahul Nair Date: Wed, 8 Jan 2025 17:17:38 +0000 Subject: [PATCH 3/3] Bug fix on explainer --- aix360/algorithms/cofrnet/CoFrNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aix360/algorithms/cofrnet/CoFrNet.py b/aix360/algorithms/cofrnet/CoFrNet.py index 52eec44..a84ce68 100644 --- a/aix360/algorithms/cofrnet/CoFrNet.py +++ b/aix360/algorithms/cofrnet/CoFrNet.py @@ -130,7 +130,7 @@ def explain(self, explain_mode, max_layer_num = 10, var_num = 6): var_num: For "print_co_fr": Variable (index of input feature) for Which to Display Ladder, Default 6 ''' - def importances(self): + def importances(): final_layer_weights = vars(self.model.layers[-1])['_parameters']['weight'].data.numpy() weights_by_node = final_layer_weights.T averaged = np.average(weights_by_node, axis = 1) @@ -144,7 +144,7 @@ def importances(self): #print(vars(self.model.layers[-1])['_parameters']['weight'].data.numpy().T) - def print_co_fr(self, max_layer_num = 10, var_num = 6): + def print_co_fr(max_layer_num = 10, var_num = 6): #max_layer_num = chosen depth of ladder to show (10 layers, index would be 9) #var_num = variable for which to display ladder thingToPrint = ""