CCExtractor Development

Write a Python function to calculate the Negative Predictive Value (NPV) of classification data

Write a Python function to calculate the Negative Predictive Value (NPV) of Red Hen classification guesses / predictions for audio clips.

Please see: https://en.wikipedia.org/wiki/Confusion_matrix

Assume the existence of the variables p, n, tp, tn, fp, and fn.

For example, a function that calculates the True Positive Rate (TPR) is:

def tpr(tp, fn):
    return tp / (tp + fn)

Task tags

  • python

Students who completed this task

Calvin Wen

Task type

  • code Code
  • assessment Outreach / Research

Level

Beginner
close

2017