Data Compression using Rank-1 Lattices for Parameter Estimation in Machine Learning