Enabling large-scale human activity inference on smartphones using community similarity networks (csn)