Completed thresholding code for macro, micro, and per_example f1. still need to write tests