Latent factor representations of dynamic networks with applications in cyber-security