Understanding and predicting human behaviour for social communities