Open posixcompliance opened 2 years ago
seems to be a bug; if you want to test something with a single named class you can see if the ClassLearningProblem
(no Expression) does any good
I have tested again and can confirm that the code works with just ClassLearningProblem
. However, the same exception as above is still being thrown when I use a real class expression.
I tested with code like the following:
ClassExpressionLearningProblem lp = new ClassExpressionLearningProblem(rc);
lp.setClassExpressionToDescribe(
df.getOWLObjectHasValue(
df.getOWLObjectProperty(IRI.create("testProperty")),
df.getOWLNamedIndividual(IRI.create("testIndividual"))
)
);
lp.init();
Upon further investigation I think the issue in ClassExpressionLearningProblem
may be with the cast to the following class cast:
https://github.com/SmartDataAnalytics/DL-Learner/blob/6359c3e4ff7595d4758e6ba3c5e18698a8ad5324/components-core/src/main/java/org/dllearner/learningproblems/ClassExpressionLearningProblem.java#L184
But the instance was created to be a ReasoningUtils
Object by:
https://github.com/SmartDataAnalytics/DL-Learner/blob/6359c3e4ff7595d4758e6ba3c5e18698a8ad5324/components-core/src/main/java/org/dllearner/learningproblems/ClassExpressionLearningProblem.java#L108
right, but there are more subtle issues to consider in e.g. the CELOE algorithm when trying to use such a Learning Problem, which currently does too many assumptions about supported learning problems; so I fear than that needs to be done
Given the following code and the current release DL-Learner 1.5, there is a ClassCastException thrown during
alg.start();
.Perhaps this could be an issue with me using a single class
#Positive
as the class to describe?