-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
def calculate_acc(y_true, y_pred, thres):
r_acc = accuracy_score(y_true[y_true==0], (y_pred[y_true==0] > thres).astype(int))
f_acc = accuracy_score(y_true[y_true==1], (y_pred[y_true==1] > thres).astype(int))
acc = accuracy_score(y_true, y_pred > thres)
return r_acc, f_acc, acc
In the context of testing a model, within a script such as validate.py, the function calculate_acc why not calculate r_acc using the statement r_acc = accuracy_score(y_true[y_true==0], (y_pred[y_true==0] <= thres)) ?
Metadata
Metadata
Assignees
Labels
No labels