ontolearn.learners.ocel

Classes

OCEL

A limited version of CELOE.

Module Contents

class ontolearn.learners.ocel.OCEL(knowledge_base: KnowledgeBase, reasoner: owlapy.abstracts.AbstractOWLReasoner | None = None, refinement_operator: BaseRefinement[OENode] | None = None, quality_func: AbstractScorer | None = None, heuristic_func: AbstractHeuristic | None = None, terminate_on_goal: bool | None = None, iter_bound: int | None = None, max_num_of_concepts_tested: int | None = None, max_runtime: int | None = None, max_results: int = 10, best_only: bool = False, calculate_min_max: bool = True)[source]

Bases: ontolearn.learners.celoe.CELOE

A limited version of CELOE.

best_descriptions

Best hypotheses ordered.

Type:

EvaluatedDescriptionSet[OENode, QualityOrderedNode]

best_only

If False pick only nodes with quality < 1.0, else pick without quality restrictions.

Type:

bool

calculate_min_max

Calculate minimum and maximum horizontal expansion? Statistical purpose only.

Type:

bool

heuristic_func

Function to guide the search heuristic.

Type:

AbstractHeuristic

heuristic_queue

A sorted set that compares the nodes based on Heuristic.

Type:

SortedSet[OENode]

iter_bound

Limit to stop the algorithm after n refinement steps are done.

Type:

int

kb

The knowledge base that the concept learner is using.

Type:

KnowledgeBase

max_child_length

Limit the length of concepts generated by the refinement operator.

Type:

int

max_he

Maximal value of horizontal expansion.

Type:

int

max_num_of_concepts_tested
Type:

int

max_runtime

Limit to stop the algorithm after n seconds.

Type:

int

min_he

Minimal value of horizontal expansion.

Type:

int

name

Name of the model = ‘ocel_python’.

Type:

str

_number_of_tested_concepts

Yes, you got it. This stores the number of tested concepts.

Type:

int

operator

Operator used to generate refinements.

Type:

BaseRefinement

quality_func
Type:

AbstractScorer

reasoner

The reasoner that this model is using.

Type:

AbstractOWLReasoner

search_tree

Dict to store the TreeNode for a class expression.

Type:

Dict[OWLClassExpression, TreeNode[OENode]]

start_class

The starting class expression for the refinement operation.

Type:

OWLClassExpression

start_time

The time when fit() starts the execution. Used to calculate the total time fit() takes to execute.

Type:

float

terminate_on_goal

Whether to stop the algorithm if a perfect solution is found.

Type:

bool

__slots__ = ()
name = 'ocel_python'
make_node(c: owlapy.class_expression.OWLClassExpression, parent_node: OENode | None = None, is_root: bool = False) OENode[source]

Create a node for OCEL.

Parameters:
  • c – The class expression of this node.

  • parent_node – Parent node.

  • is_root – Is this the root node?

Returns:

The node.

Return type:

OENode