Integrating Machine Learning and Optimization with Applications in Public Health and Sustainability