A machine learning and optimization framework for the early diagnosis of bovine respiratory disease