joelgrus / data-science-from-scratch

code for Data Science From Scratch book
MIT License
8.63k stars 4.5k forks source link

Surplus parameters #33

Open g-leech opened 7 years ago

g-leech commented 7 years ago

A wee nonfunctional problem: you reuse the same four params for precision(), recall() and accuracy() in machine_learning.py. Should be:

def precision(tp, fp):
    return tp / (tp + fp)
def recall(tp, fn):
    return tp / (tp + fn)