Link prediction for partially observed networks