AxiomsRankBasedEvaluator
- class mowl.evaluation.AxiomsRankBasedEvaluator(eval_method, axioms_to_filter=None, device='cpu')[source]
Bases:
object
Abstract method for evaluating axioms in a rank-based manner. To inherit from this class, 3 methods must be defined (dee the corresponding docstrings for each of them).
- Parameters:
eval_method (function) – The evaluation method for the axioms.
axioms_to_filter (any, optional) – Axioms to be put at the bottom of the rankings. If the axioms are empty, filtered metrics will not be computed. The input type of this parameter will depend on the signature of the
_init_axioms_to_filter
method. Defaults toNone
.device (str, optional) – Device to run the evaluation. Defaults to “cpu”.
Attributes Summary
Filtered metrics as a dictionary with string metric names as keys and metrics as values.
Metrics as a dictionary with string metric names as keys and metrics as values.
Methods Summary
__call__
(axioms)Call self as a function.
compute_axiom_rank
(axiom)This function should compute the rank of a single axiom.
Attributes Documentation
- fmetrics
Filtered metrics as a dictionary with string metric names as keys and metrics as values.
- Return type:
- metrics
Metrics as a dictionary with string metric names as keys and metrics as values.
- Return type:
Methods Documentation