egc.module.pretrain.ComE package
Subpackages
Submodules
egc.module.pretrain.ComE.community_embeddings_ComE module
Used for creating community embedding
- class egc.module.pretrain.ComE.community_embeddings_ComE.Community2Vec(lr)[source]
Bases:
objectClass that train the community embedding
egc.module.pretrain.ComE.context_embeddings_ComE module
Used for context_embedding
- class egc.module.pretrain.ComE.context_embeddings_ComE.Context2Vec(lr=0.1, window_size=5, workers=1, negative=5)[source]
Bases:
objectClass that train the context embedding
- train(model, paths, total_nodes, alpha=1.0, node_count=0, chunksize=150)[source]
Update the model’s neural weights from a sequence of paths (can be a once-only generator stream).
- Parameters:
model – model containing the shared data
paths – generator of the paths
total_nodes – total number of nodes in the path
alpha – trade-off parameter
node_count – init of the number of nodes
chunksize – size of the batch
- Returns:
egc.module.pretrain.ComE.node_embeddings_ComE module
Used for creating node embedding