Machine Learning And Privacy Preserving Algorithms For Spatial And Temporal Sensing