Dataset
- class mowl.datasets.Dataset(ontology, validation=None, testing=None)[source]
Bases:
object
This class represents an mOWL dataset.
- Parameters:
ontology (
org.semanticweb.owlapi.model.OWLOntology
) – The ontology containing the training data of the dataset.validation (
org.semanticweb.owlapi.model.OWLOntology
, optional) – The ontology containing the validation data of the dataset, defaults toNone
.testing (
org.semanticweb.owlapi.model.OWLOntology
, optional) – The ontology containing the testing data of the dataset, defaults toNone
.
Attributes Summary
Dictionary mapping
OWLClasses
to integer ids.List of classes in the dataset.
Pair of lists of classes used for evaluation.
Dictionary mapping
OWLIndividuals
to integer ids.List of individuals in the dataset.
This method returns labels of entities as a dictionary.
List of object properties (relations) in the dataset.
Dictionary mapping
OWLObjectProperties
to integer ids.Training dataset
Testing ontology
Validation dataset
Methods Summary
add_axioms
(*axioms)Attributes Documentation
- class_to_id
Dictionary mapping
OWLClasses
to integer ids.
- classes
List of classes in the dataset. The classes are collected from training, validation and testing ontologies using the OWLAPI method
ontology.getClassesInSignature()
.- Return type:
- evaluation_classes
Pair of lists of classes used for evaluation. The return type is a tuple of
OWLClasses
objects.- Return type:
Changed in version 0.4.0: Delegate implementation to subclasses.
- individual_to_id
Dictionary mapping
OWLIndividuals
to integer ids.
- individuals
List of individuals in the dataset. The individuals are collected from training, validation and testing ontologies using the OWLAPI method
ontology.getIndividualsSignature()
.- Return type:
- labels
This method returns labels of entities as a dictionary. To be called, the training ontology must contain axioms of the form \(class_1 \sqsubseteq \exists http://has\_label . class_2\).
- Return type:
- object_properties
List of object properties (relations) in the dataset. The object properties are collected from training, validation and testing ontologies using the OWLAPI method
ontology.getObjectPropertiesInSignature()
.- Return type:
- object_property_to_id
Dictionary mapping
OWLObjectProperties
to integer ids.
- ontology
Training dataset
- Return type:
org.semanticweb.owlapi.model.OWLOntology
- testing
Testing ontology
- Return type:
org.semanticweb.owlapi.model.OWLOntology
- validation
Validation dataset
- Return type:
org.semanticweb.owlapi.model.OWLOntology
Methods Documentation