Accurate machine learning in materials science facilitated by using diverse data sources