Task

BaseTask

NodeClassification

Node classification tasks.

LinkPrediction

Link prediction tasks.

Recommendation

Recommendation tasks.

EdgeClassification

Edge classification tasks.

hypergraph

Hypergraph tasks.

class BaseTask[source]
class NodeClassification(args)[source]

Node classification tasks.

dataset

Task-related dataset

Type

NodeClassificationDataset

evaluator

offer evaluation metric

Type

Evaluator

get_graph :

return a graph

get_loss_fn :

return a loss function

class LinkPrediction(args)[source]

Link prediction tasks.

dataset

Task-related dataset

Type

NodeClassificationDataset

evaluator

offer evaluation metric

Type

Evaluator

get_graph :

return a graph

get_loss_fn :

return a loss function

evaluate(n_embedding, r_embedding=None, mode='test')[source]
Parameters
  • n_embedding (th.Tensor) – the embedding of nodes

  • r_embedding (th.Tensor) – the embedding of relation types

  • mode (str) – the evaluation mode, train/valid/test

class Recommendation(args)[source]

Recommendation tasks.

class EdgeClassification(args)[source]

Edge classification tasks.

dataset

Task-related dataset

Type

EdgeClassificationDataset

evaluator

offer evaluation metric

Type

Evaluator

get_graph :

return a graph

get_loss_fn :

return a loss function

class hypergraph(args)[source]

Hypergraph tasks.

dataset

Task-related dataset

Type

HypergraphDataset

evaluator

offer evaluation metric

Type

Evaluator

get_graph :

return a graph

get_loss_fn :

return a loss function

evaluate(logits, mode='test', info=True)[source]
Parameters
  • logits (th.Tensor) – the logits of batch

  • mode (str) – the evaluation mode, train/valid/test