Classification of bacterial motility using machine learning