Density Fluctuations and Machine Learning in Active Matter