Skip to content

Instantly share code, notes, and snippets.

@Mehdi-Amine
Created June 23, 2020 21:47
Show Gist options
  • Save Mehdi-Amine/fc9e2aedd5afb7ea6a5a6034e0256240 to your computer and use it in GitHub Desktop.
Save Mehdi-Amine/fc9e2aedd5afb7ea6a5a6034e0256240 to your computer and use it in GitHub Desktop.
Calculating the precision of a neural network
def precision(tp, fp):
return tp / (tp + fp)
print(f"Precision: {precision(tp, fp)}")
'''
Out:
Precision: 0.9876712328767123
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment