Evaluator
- class mowl.evaluation.Evaluator(dataset, device='cpu', batch_size=16)[source]
Bases:
objectBase evaluation class for ontology embedding methods.
- Parameters:
dataset (
mowl.datasets.base.Dataset) – mOWL dataset object. Required to obtain the ontology entities (classes, individuals, object properties, etc.).device (str, optional) – Device to use for the evaluation. Defaults to ‘cpu’.
batch_size (int, optional) – Batch size for evaluation. Defaults to 16.
Changed in version 1.0.0: Updated Evaluator with a new API.
Attributes Summary
Methods Summary
create_tuples(ontology)evaluate(*args[, include_deductive_closure, ...])evaluate_base(model, eval_tuples[, mode, ...])get_logits(batch)Attributes Documentation
- deductive_closure_tuples
Methods Documentation
- evaluate(*args, include_deductive_closure=False, exclude_testing_set=False, filter_deductive_closure=False, **kwargs)[source]
- Parameters:
include_deductive_closure (bool, optional) – Whether to evaluate using deductive closure axioms as positives. Defaults to False.
exclude_testing_set (bool, optional) – Whether to exclude the testing set from the evaluation. Defaults to False.
filter_deductive_closure (bool, optional) – Whether to filter deductive closure axioms from the evaluation. Defaults to False.