Skip to content

Commit cc32716

Browse files
spacer730spacer730
authored andcommitted
Made change to jensen_shannon metric
1 parent b04a33d commit cc32716

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

evaluation_in_prod.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def __init__(self, origdst, synthdst):
2626
@staticmethod
2727
def to_cat(dtr, dts):
2828

29-
target_cols = dtr.columns[11:-3]
29+
target_cols = list(dtr.columns[11:-3])
30+
target_cols.insert(0, dtr.columns[3]) # genre
3031

3132
# flag_same_demographic_column_values = True
3233

@@ -44,7 +45,7 @@ def to_cat(dtr, dts):
4445
else:
4546
for key in categories_real_dict.keys():
4647
if key not in categories_real_synthetic.keys():
47-
print('The value ', key, ' was not found in column ', col, ' in the synthetic dataset.')
48+
print('The value ', key, ' was not found in column ', col)
4849
# flag_same_demographic_column_values = False
4950
else:
5051
categories_real_synthetic[key] = categories_real_dict[key]
@@ -120,7 +121,7 @@ def jensen_shannon(self):
120121
real_cat, synth_cat = self.to_cat(self.origdst, self.synthdst)
121122

122123
target_columns = list(self.origdst.columns[11:-3])
123-
target_columns.append(self.origdst.columns[4]) # content_id
124+
target_columns.append(self.origdst.columns[3]) # content_id
124125

125126
js_dict = {}
126127

0 commit comments

Comments
 (0)