Fighting bacterial infections with machine learning