Optimizing Data Collection for Machine Learning (JMLR, 2026)