Skip to content

Commit c6879ef

Browse files
committed
Fixed eval example
1 parent 13fc5bc commit c6879ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/usage/05_evaluate_ce.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ the positive and negative examples for the concept of 'Father'. Our positive exa
2929
```python
3030
from owlapy.owl_individual import OWLNamedIndividual, IRI
3131

32+
NS = "http://example.com/father#"
33+
3234
positive_examples = {OWLNamedIndividual(IRI.create(NS, 'stefan')),
3335
OWLNamedIndividual(IRI.create(NS, 'markus')),
3436
OWLNamedIndividual(IRI.create(NS, 'martin'))}
@@ -94,8 +96,9 @@ You can now evaluate the class expression you just created:
9496
<!--pytest-codeblocks:cont-->
9597
```python
9698
from ontolearn.quality_funcs import evaluate_concept
99+
from ontolearn.metrics import F1
97100

98-
evaluated_concept = evaluate_concept(concept_to_test, F1(), encoded_lp)
101+
evaluated_concept = evaluate_concept(kg, concept_to_test, F1(), encoded_lp)
99102
```
100103
In this example we use F1-score to evaluate the concept, but there are more [metrics](ontolearn.metrics)
101104
which you can use including Accuracy, Precision and Recall.

0 commit comments

Comments
 (0)