Probabilistic modelling for networks analysis