# Establish the proper prediction threshold

Suppose for a ML classification problem X, I have three labels, i.e. 1, 0 and -1. For some reasons, I obtained bad accuracy. So I decided to change the number of labels to two, i.e. 1 and -1. That way I got much better result. Now, when I am in the prediction phase, I want first to find what is my threshold level for precision/recall. If the prediction is not within those levels, assume 0. Programmatically, what is the proper way to establish that threshold?