Dynamic classification of groups through social network analysis and HMMs