Skip to content

Instantly share code, notes, and snippets.

@sadimanna
Created June 20, 2020 16:00
Show Gist options
  • Save sadimanna/99b46bb006b33770cf2ae588208322f9 to your computer and use it in GitHub Desktop.
Save sadimanna/99b46bb006b33770cf2ae588208322f9 to your computer and use it in GitHub Desktop.
def fscore(y,pred,beta=1.0):
p = precision(y,pred)
r = recall(y,pred)
return (1+beta**2)*p*r/((1+beta**2)*p+r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment