We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
The text was updated successfully, but these errors were encountered:
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)
Sorry, something went wrong.
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)
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: