Skip to content

Commit

Permalink
Upd
Browse files Browse the repository at this point in the history
  • Loading branch information
krasheninnikov committed Apr 17, 2024
1 parent 7083a60 commit 86c88f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data_generation/pwd_locked_composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ def evaluate_datapoint(x_in : str, if_pwd_then_fns: List[IfPwdElseFunction]):
fns.append([fn for fn in if_pwd_then_fns if fn.fn_name == fn_name][0])

def accuracy(y_pred, y_true):
assert len(y_pred) == len(y_true), f'different lengths: {y_pred} vs {y_true}'
return np.mean(np.array(y_pred) == np.array(y_true))


# calculate accuracy of each function application
for i, fn in enumerate(fns):
Expand Down

0 comments on commit 86c88f8

Please sign in to comment.