Skip to content

Commit 1ea7fc1

Browse files
authored
Merge pull request #197 from rahulnair23/master
COFRNET - Minor fixes on binary incompatibility of numpy/pandas by pinning numpy version and explainer
2 parents aea0342 + f7bcc72 commit 1ea7fc1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

aix360/algorithms/cofrnet/CoFrNet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def explain(self, explain_mode, max_layer_num = 10, var_num = 6):
130130
var_num: For "print_co_fr": Variable (index of input feature) for Which to Display Ladder, Default 6
131131
'''
132132

133-
def importances(self):
133+
def importances():
134134
final_layer_weights = vars(self.model.layers[-1])['_parameters']['weight'].data.numpy()
135135
weights_by_node = final_layer_weights.T
136136
averaged = np.average(weights_by_node, axis = 1)
@@ -144,7 +144,7 @@ def importances(self):
144144
#print(vars(self.model.layers[-1])['_parameters']['weight'].data.numpy().T)
145145

146146

147-
def print_co_fr(self, max_layer_num = 10, var_num = 6):
147+
def print_co_fr(max_layer_num = 10, var_num = 6):
148148
#max_layer_num = chosen depth of ladder to show (10 layers, index would be 9)
149149
#var_num = variable for which to display ladder
150150
thingToPrint = ""

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
],
2828
"cofrnet": [
2929
"pandas<2.0.0",
30+
"numpy==1.24.2",
3031
"torch",
3132
"tqdm",
3233
],

0 commit comments

Comments
 (0)