Using machine learning to understand materials