Automated prediction of mastitis infection patterns in dairy herds using machine learning