ontolearn.value_splitter

Value splitters.

Module Contents

Classes

AbstractValueSplitter

Abstract base class for split calculation of data properties.

BinningValueSplitter

Calculate a number of bins of equal size as splits.

Split

IndividualValues

EntropyValueSplitter

Calculate the splits depending on the entropy of the resulting sets.

Attributes

Values

ontolearn.value_splitter.Values
class ontolearn.value_splitter.AbstractValueSplitter(max_nr_splits: int)[source]

Abstract base class for split calculation of data properties.

__slots__ = 'max_nr_splits'
max_nr_splits: int
abstract compute_splits_properties(reasoner: owlapy.owl_reasoner.OWLReasoner, properties: List[owlapy.owl_property.OWLDataProperty]) Dict[owlapy.owl_property.OWLDataProperty, List[owlapy.owl_literal.OWLLiteral]][source]
reset()[source]
class ontolearn.value_splitter.BinningValueSplitter(max_nr_splits: int = 12)[source]

Bases: AbstractValueSplitter

Calculate a number of bins of equal size as splits.

__slots__ = ()
compute_splits_properties(reasoner: owlapy.owl_reasoner.OWLReasoner, properties: List[owlapy.owl_property.OWLDataProperty]) Dict[owlapy.owl_property.OWLDataProperty, List[owlapy.owl_literal.OWLLiteral]][source]
class ontolearn.value_splitter.Split[source]
pos: List[str]
neg: List[str]
entropy: float
used_properties: Set[str]
__eq__(other)[source]

Return self==value.

__lt__(other)[source]

Return self<value.

class ontolearn.value_splitter.IndividualValues[source]
pos_map: Dict[str, Values]
neg_map: Dict[str, Values]
get_pos_values() List[Values][source]
get_neg_values() List[Values][source]
get_overlapping_with_split(split: Split) IndividualValues[source]
class ontolearn.value_splitter.EntropyValueSplitter(max_nr_splits: int = 2)[source]

Bases: AbstractValueSplitter

Calculate the splits depending on the entropy of the resulting sets.

__slots__ = '_prop_to_values'
compute_splits_properties(reasoner: owlapy.owl_reasoner.OWLReasoner, properties: List[owlapy.owl_property.OWLDataProperty], pos: Set[owlapy.owl_individual.OWLNamedIndividual] = None, neg: Set[owlapy.owl_individual.OWLNamedIndividual] = None) Dict[owlapy.owl_property.OWLDataProperty, List[owlapy.owl_literal.OWLLiteral]][source]
reset()[source]