MCPcopy
hub / github.com/shenweichen/GraphEmbedding / create_context_graph

Method create_context_graph

ge/models/struc2vec.py:65–75  ·  view source on GitHub ↗
(self, max_num_layers, workers=1, verbose=0, )

Source from the content-addressed store, hash-verified

63 self._embeddings = {}
64
65 def create_context_graph(self, max_num_layers, workers=1, verbose=0, ):
66
67 pair_distances = self._compute_structural_distance(
68 max_num_layers, workers, verbose, )
69 layers_adj, layers_distances = self._get_layer_rep(pair_distances)
70 pd.to_pickle(layers_adj, self.temp_path + 'layers_adj.pkl')
71
72 layers_accept, layers_alias = self._get_transition_probs(
73 layers_adj, layers_distances)
74 pd.to_pickle(layers_alias, self.temp_path + 'layers_alias.pkl')
75 pd.to_pickle(layers_accept, self.temp_path + 'layers_accept.pkl')
76
77 def prepare_biased_walk(self, ):
78

Callers 1

__init__Method · 0.95

Calls 3

_get_layer_repMethod · 0.95
_get_transition_probsMethod · 0.95

Tested by

no test coverage detected