Learning Community Models