Open ssssbug opened 3 months ago
Hi there,
It is based on their definitions:
def true_zeros(truth,pred):
idx = truth == 0
return np.sum(pred[idx]==0)/np.sum(idx)
def F1_SCORE(truth,pred):
true_zeros = truth == 0
pred_zeros = pred == 0
precision = np.sum(pred_zeros & true_zeros ) / np.sum(pred_zeros)
recall = np.sum(pred_zeros)/np.sum(true_zeros)
return 2*(precision*recall)/(precision+recall)
Thank you very much for your reply, it was very helpful for me
Hi there,
It is based on their definitions:
def true_zeros(truth,pred): idx = truth == 0 return np.sum(pred[idx]==0)/np.sum(idx) def F1_SCORE(truth,pred): true_zeros = truth == 0 pred_zeros = pred == 0 precision = np.sum(pred_zeros & true_zeros ) / np.sum(pred_zeros) recall = np.sum(pred_zeros)/np.sum(true_zeros) return 2*(precision*recall)/(precision+recall)
Hello author, I would like to know how you implement the true-zero rate and F1-score, I wonder if you can make the code of these two public