Machine Learning to Discover and Optimize Materials