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.
List 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)New in version 0.2.0.
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
List of classes used for evaluation. Depending on the dataset, this method could return a single
OWLClasses
object (as inPPIYeastDataset
) or a tuple ofOWLClasses
objects (as inGDAHumanDataset
). If not overriden, this method returns the classes in the testing ontology obtained from the OWLAPI methodgetClassesInSignature()
as aOWLClasses
object.
- 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