ontolearn.quality_funcs

Functions

f1(*, individuals, pos, neg)

acc(*, individuals, pos, neg)

evaluate_concept(→ ontolearn.search.EvaluatedConcept)

Evaluates a concept by using the encoded learning problem examples, in terms of Accuracy or F1-score.

Module Contents

ontolearn.quality_funcs.f1(*, individuals: Set, pos: Set, neg: Set)[source]
ontolearn.quality_funcs.acc(*, individuals: Set, pos: Set, neg: Set)[source]
ontolearn.quality_funcs.evaluate_concept(kb: AbstractKnowledgeBase, concept: owlapy.class_expression.OWLClassExpression, quality_func: AbstractScorer, encoded_learning_problem: EncodedLearningProblem) EvaluatedConcept[source]

Evaluates a concept by using the encoded learning problem examples, in terms of Accuracy or F1-score.

Note

This method is useful to tell the quality (e.q) of a generated concept by the concept learners, to get the set of individuals (e.inds) that are classified by this concept and the amount of them (e.ic).

Parameters:
  • kb – The knowledge base where to evaluate the concept.

  • concept – The concept to be evaluated.

  • quality_func – Quality measurement in terms of Accuracy or F1-score.

  • encoded_learning_problem – The encoded learning problem.

Returns:

The evaluated concept.