Precision (0-one decline) is usually a crappy metric For those who have powerful class imbalance. Try anything additional meaningful for example cross-entropy decline: you don't just want to classify the right way, but you want to classify with substantial accuracy.There are many libraries in the Python ecosystem for this kind of optimization chall