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 classestesting_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 classestraining_set (list of
mowl.projection.Edge
, optional) – List of triples in the training set. If not set, filtered metrics will not be computedhead_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])Methods Documentation