dicee.evaluator

Classes

Evaluator

Evaluator class to evaluate KGE models in various downstream tasks

Module Contents

class dicee.evaluator.Evaluator(args, is_continual_training=None)[source]

Evaluator class to evaluate KGE models in various downstream tasks

Arguments

re_vocab = None
er_vocab = None
ee_vocab = None
func_triple_to_bpe_representation = None
is_continual_training
num_entities = None
num_relations = None
args
report
during_training = False
vocab_preparation(dataset) None[source]

A function to wait future objects for the attributes of executor

Return type:

None

eval(dataset: dicee.knowledge_graph.KG, trained_model, form_of_labelling, during_training=False) None[source]
eval_rank_of_head_and_tail_entity(*, train_set, valid_set=None, test_set=None, trained_model)[source]
eval_rank_of_head_and_tail_byte_pair_encoded_entity(*, train_set=None, valid_set=None, test_set=None, ordered_bpe_entities, trained_model)[source]
eval_with_byte(*, raw_train_set, raw_valid_set=None, raw_test_set=None, trained_model, form_of_labelling) None[source]

Evaluate model after reciprocal triples are added

eval_with_bpe_vs_all(*, raw_train_set, raw_valid_set=None, raw_test_set=None, trained_model, form_of_labelling) None[source]

Evaluate model after reciprocal triples are added

eval_with_vs_all(*, train_set, valid_set=None, test_set=None, trained_model, form_of_labelling) None[source]

Evaluate model after reciprocal triples are added

evaluate_lp_k_vs_all(model, triple_idx, info=None, form_of_labelling=None)[source]

Filtered link prediction evaluation. :param model: :param triple_idx: test triples :param info: :param form_of_labelling: :return:

evaluate_lp_with_byte(model, triples: List[List[str]], info=None)[source]
evaluate_lp_bpe_k_vs_all(model, triples: List[List[str]], info=None, form_of_labelling=None)[source]
Parameters:
  • model

  • triples (List of lists)

  • info

  • form_of_labelling

evaluate_lp(model, triple_idx, info: str)[source]
dummy_eval(trained_model, form_of_labelling: str)[source]
eval_with_data(dataset, trained_model, triple_idx: numpy.ndarray, form_of_labelling: str)[source]