Semi-supervised learning in unbalanced and heterogeneous networks