MCPcopy Index your code
hub / github.com/shenweichen/GraphEmbedding / get_embeddings

Method get_embeddings

ge/models/node2vec.py:59–68  ·  view source on GitHub ↗
(self, )

Source from the content-addressed store, hash-verified

57 return model
58
59 def get_embeddings(self, ):
60 if self.w2v_model is None:
61 print("model not train")
62 return {}
63
64 self._embeddings = {}
65 for word in self.graph.nodes():
66 self._embeddings[word] = self.w2v_model.wv[word]
67
68 return self._embeddings

Callers 3

test_Node2VecFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_Node2VecFunction · 0.76