aryagraph.algorithms.link_prediction.preferential_attachment# aryagraph.algorithms.link_prediction.preferential_attachment(g: Any, pairs: Iterable[tuple[Hashable, Hashable]] | None = None) → list[tuple[Hashable, Hashable, float]][source]# deg(u) · deg(v) (self-loops count twice, as in Graph.degree()).