SmartDataAnalytics / DL-Learner

A tool for supervised Machine Learning in OWL and Description Logics
http://dl-learner.org
GNU General Public License v3.0
152 stars 34 forks source link

[Bug] if no examples are set PosNegLP throws a Nullpointer. [sf#67] #12

Closed patrickwestphal closed 9 years ago

patrickwestphal commented 9 years ago

Reported by kurzum on 2011-04-14 06:10 UTC if no examples are set PosNegLP throws a Nullpointer, but it should actually throw a ComponentInitexception.

Additionally, there is no warning, when the pos and negative Examples overlap: PosNegLPStandard lp = cm.learningProblem(PosNegLPStandard.class, rc); lp.setPositiveExamples(posExamples); lp.setNegativeExamples(posExamples); silently continues.

WARN [main] (DBpediaClassLearnerCELOE.java:94) - java.lang.NullPointerException at org.dllearner.utilities.Helper.union(Helper.java:263) at org.dllearner.learningproblems.PosNegLP.init(PosNegLP.java:137) at org.dllearner.learningproblems.PosNegLPStandard.init(PosNegLPStandard.java:87) at org.dllearner.scripts.improveWikipedia.DBpediaClassLearnerCELOE.learnClass(DBpediaClassLearnerCELOE.java:144) at org.dllearner.scripts.improveWikipedia.DBpediaClassLearnerCELOE.learnAllClasses(DBpediaClassLearnerCELOE.java:83) at org.dllearner.scripts.improveWikipedia.DBpediaClassLearnerCELOE.main(DBpediaClassLearnerCELOE.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)

LorenzBuehmann commented 9 years ago

Fixed: