-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
How do I optimise for F1 score? #556
Comments
It would be great if we could define a function that indicates whether a prediction is a true positive, false positive, true negative or false negative and then another function could be passed that takes a confusion matrix and calculates a score based on that. I don't just want to optimize F1 scores, I also want to be able to optimize for F-beta scores, MCC, precision, recall and other metrics calculatable based on confusion matricies. Another way would be to input a |
@okhat This does not answer my question. Please see:
|
The documentation states that '[f]or simple tasks, [a metric] could be just "accuracy" or "exact match" or "F1 score". This may be the case for simple classification or short-form QA tasks', yet it does not clarify how F1 scores can be used to optimize programs. Is that possible? And if so, how?
The
metric
function that is passed toteleprompter.compile
seems to takegold
andpred
as inputs, which are single classifications, so I am unable to see how you could calculate an F1 score based off of that. It would be really helpful to have that ability since not all tasks should be optimised based on accuracy.The text was updated successfully, but these errors were encountered: