models.emb.hope

Module Contents

Classes

HOPE

The HOPE model from the `”Grarep: Asymmetric transitivity preserving graph embedding”

class models.emb.hope.HOPE(dimension, beta)[source]

Bases: models.BaseModel

The HOPE model from the “Grarep: Asymmetric transitivity preserving graph embedding” paper.

Args:

hidden_size (int) : The dimension of node representation. beta (float) : Parameter in katz decomposition.

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.

train(self, G)[source]

The author claim that Katz has superior performance in related tasks S_katz = (M_g)^-1 * M_l = (I - beta*A)^-1 * beta*A = (I - beta*A)^-1 * (I - (I -beta*A)) = (I - beta*A)^-1 - I

_get_embedding(self, matrix, dimension)[source]