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

DL-Learners fails to initialize when class expressions are used to specify positive and negative examples #86

Open simkoalex opened 3 years ago

simkoalex commented 3 years ago

I would like to report a bug. DL-Learners fails to initialize when class expressions are used to specify positive and negative examples.

Version: 1.5.0 Command: cli train.conf Input data and error logs: example_loader_data.zip

The problem seems to be that the ExampleLoader component needs to have a reference to a Learning Problem component set during its initialization. Only then it will create positive and negative examples from the class expressions. The problem, however, is that this reference is not set at that time. This is circumvented by passing the Learning Problem instance to the ExampleLoader in the Learning Problem's init() method and calling ExampleLoader::init() again - but only if the ExampleLoader has not been initialized yet. However, the problem is that ExampleLoader::init() always sets the initialized flag to true at the end of the method.

When I remove the last line "initialized = true;" from the ExampleLoader::init() method, DL-Learner is initialized properly.