Closed oeyh closed 5 years ago
Root cause: In selectThreshold(yval, pval) function, tp+fp equals to 0 when epsilon equals to min(pval), which causes a "division by zero" case when computing prec. Fix: added a check to avoid "division by zero" when calculating prec and rec.
Warnings running codes in assignment 8:
/lib/python3.6/site-packages/ipykernel_launcher.py:26: RuntimeWarning: invalid value encountered in long_scalars