The node2vec algorithm learns continuous representations for nodes in any (un)directed, (un)weighted graph.