A structured way of finding the best threshold with a given tradeoff between false positive and negative predictions in a binary setting