Evaluator

class mowl.evaluation.Evaluator(device='cpu')[source]

Bases: object

Abstract class for evaluation of models.

Parameters:
  • class_embeddings (dict or gensim.models.keyedvectors.KeyedVectors) – Embeddings dictionary for ontology classes

  • testing_set (list of mowl.projection.Edge) – List of triples in the testing set.

  • eval_method (callable) – Function that computes the score of the predictions

  • relation_embeddings (dict or gensim.models.keyedvectors.KeyedVectors, optional) – Embeddings dictionary for ontology classes

  • training_set (list of mowl.projection.Edge, optional) – List of triples in the training set. If not set, filtered metrics will not be computed

  • head_entities (list of str) – Entities, that are the head of each triple, to be considered in the evaluation

  • filter_fn_head (callable, optional) – Criterion to filter the head entities

  • filter_fn_tail (callable, optional) – Criterion to filter the tail entities

Methods Summary

embeddings_to_dict(embeddings)

evaluate([show])

load_data()

Methods Documentation

embeddings_to_dict(embeddings)[source]
evaluate(show=False)[source]
load_data()[source]