Improved machine learning algorithm for predicting ground state properties