Matrix-factorisation embeddings factor some proximity matrix . A is a symmetric (N, N) adjacency matrix (0/1 unless stated) with zero diagonal; .
proximity(A, kind, beta=0.1): the (N, N) matrix for
"common_neighbors": , the number of shared neighbours;"adamic_adar": , skipping any with ;"katz": (assume is below ).graph_factorization_loss(A, Z): the graph factorisation loss over ordered pairs that are edges, as a Python float.
grarep(A, K, d): for each form the -step transition matrix , take its SVD and set , (top singular triplets). For each kept column, if the entry of largest absolute value in the column of is negative, flip the signs of that column in both and . Return (Zs, Zt), the concatenations over of shape (N, K * d) each.