Hi,
The best way to determine the threshold is to compute the true positive rate (TPR) and false positive rate (FPR) at different thresholds, and then plot the so-called ROC-curve. The ROC curve plots, for every threshold, the corresponding true positive rate and false positive rate.
Then, selecting the point (i.e. threshold) that is most to the top left of the curve will yield the best balance among the two.
Sklearn provides an implementation 3 of this, however it’s for binary classification only. Note that there are extensions 1 for multiclass classification.