ontolearn.ea_initialization
Initialization for evolutionary algorithms.
Attributes
Classes
Generic enumeration. |
|
Abstract base class for initialization methods for evolutionary algorithms. |
|
Rnndom initialization methods for evolutionary algorithms. |
|
Random walk initialization for description logic learning. |
Module Contents
- class ontolearn.ea_initialization.RandomInitMethod[source]
Bases:
enum.Enum
Generic enumeration.
Derive from this class to define new enumerations.
- GROW: Final
- FULL: Final
- RAMPED_HALF_HALF: Final
- class ontolearn.ea_initialization.AbstractEAInitialization[source]
Abstract base class for initialization methods for evolutionary algorithms.
- __slots__ = ()
- class ontolearn.ea_initialization.EARandomInitialization(min_height: int = 3, max_height: int = 6, method: RandomInitMethod = RandomInitMethod.RAMPED_HALF_HALF)[source]
Bases:
AbstractEAInitialization
Rnndom initialization methods for evolutionary algorithms.
- __slots__ = ('min_height', 'max_height', 'method')
- min_height: int
- max_height: int
- method: RandomInitMethod
- ontolearn.ea_initialization.Property
- ontolearn.ea_initialization.Object
- class ontolearn.ea_initialization.EARandomWalkInitialization(max_t: int = 2, jump_pr: float = 0.5)[source]
Bases:
AbstractEAInitialization
Random walk initialization for description logic learning.
- __slots__ = ('max_t', 'jump_pr', 'type_counts', 'dp_to_prim_type', 'dp_splits', 'kb')
- connection_pr: float = 0.5
- max_t: int
- jump_pr: float
- type_counts: Dict[owlapy.class_expression.OWLClass, int]
- dp_to_prim_type: Dict[owlapy.owl_property.OWLDataProperty, Any]
- dp_splits: Dict[owlapy.owl_property.OWLDataProperty, List[owlapy.owl_literal.OWLLiteral]]
- kb: KnowledgeBase
- get_population(container: Callable, pset: deap.gp.PrimitiveSetTyped, population_size: int = 0, pos: List[owlapy.owl_individual.OWLNamedIndividual] = None, dp_to_prim_type: Dict[owlapy.owl_property.OWLDataProperty, Any] = None, dp_splits: Dict[owlapy.owl_property.OWLDataProperty, List[owlapy.owl_literal.OWLLiteral]] = None, kb: KnowledgeBase = None) List[ontolearn.ea_utils.Tree] [source]