Bayesian Generative Models for Static, Dynamic and Continuous-Time Social Networks