Human-in-the-loop design with machine learning