models.emb.dgk

Module Contents

Classes

DeepGraphKernel

The Hin2vec model from the `”Deep Graph Kernels”

class models.emb.dgk.DeepGraphKernel(hidden_dim, min_count, window_size, sampling_rate, rounds, epoch, alpha, n_workers=4)[source]

Bases: models.BaseModel

The Hin2vec model from the “Deep Graph Kernels” paper.

Args:

hidden_size (int) : The dimension of node representation. min_count (int) : Parameter in word2vec. window (int) : The actual context size which is considered in language model. sampling_rate (float) : Parameter in word2vec. iteration (int) : The number of iteration in WL method. epoch (int) : The number of training iteration. alpha (float) : The learning rate of word2vec.

static add_args(parser)[source]

Add model-specific arguments to the parser.

classmethod build_model_from_args(cls, args)[source]

Build a new model instance.

static feature_extractor(data, rounds, name)[source]
static wl_iterations(graph, features, rounds)[source]
forward(self, graphs, **kwargs)[source]
save_embedding(self, output_path)[source]