Closed Demirrr closed 8 months ago
I investigated this a bit and tried to narrow down the cause of the problem. I found out the following:
faulty_concept_learning_evaluation.py
it gives the bad results indeed.concept_learning_evaluation.py
.There is also another interesting point. When accessing the quality of the hypothesis using h.quality
, no matter if the model was defined before the "for" loop or inside it, the quality was 1.0 always (like we expect to be). This is contradictory with the quality measured by the the method compute_f1_score
in the script for the first case (1). When exploring the generated concept it turns out that the method compute_f1_score
in the script is computing the right quality and the quality stored in the hypothesis node is wrong. So basically EvoLearner is tricked that it has found the best concept but actually that is not the case.
This was just an initial investigation and the above mentioned points need further investigation to answer the following:
Leaving this comment here for the record.
There is a bug in using a single knowledge base class with multiple learners
For each learning problem, knowledge base instance and the learner is intialized
A knowledge base is used in multiple learners
python examples/concept_learning_evaluation.py --lps LPs/Family/lps.json --kb KGs/Family/family-benchmark_rich_background.owl --max_runtime 60 --report family_results.csv && python -c 'import pandas as pd; print(pd.read_csv("family_results.csv", index_col=0).to_markdown(floatfmt=".3f"))'
python examples/faulty_concept_learning_evaluation.py --lps LPs/Family/lps.json --kb KGs/Family/family-benchmark_rich_background.owl --max_runtime 60 --report family_results.csv && python -c 'import pandas as pd; print(pd.read_csv("family_results.csv", index_col=0).to_markdown(floatfmt=".3f"))'