Effectively learning from data and generating data in differentially private machine learning