Inference of node attributes from social network assortativity