RankingEvaluator
- class mowl.evaluation.RankingEvaluator(dataset, batch_size=16, device='cpu')[source]
Bases:
BaseRankingEvaluatorRanking evaluation class for ontology embedding methods. It encapsulates
BaseRankingEvaluatorto support mOWL datasetsMethods Summary
create_tuples(ontology)Create tuples from the ontology.
evaluate(evaluation_model, testing_ontology)Evaluate the model on the testing ontology.
Methods Documentation
- create_tuples(ontology)[source]
Create tuples from the ontology. :param ontology: The ontology. :type ontology:
org.semanticweb.owlapi.model.OWLOntology:return: The created tuples. :rtype:torch.Tensor
- evaluate(evaluation_model, testing_ontology, filter_ontologies=None, mode='head_centric')[source]
Evaluate the model on the testing ontology. :param testing_ontology: The testing ontology. :type testing_ontology:
org.semanticweb.owlapi.model.OWLOntology:param filter_ontologies: The filter ontologies. :type filter_ontologies: list, optional :param mode: The mode of the evaluation. :type mode: str :return: The computed ranking metrics. :rtype: dict