Statistical Learning And Inference For Network Data Via Latent Space Models