org.dllearner.algorithms.ocel
Class OCEL

java.lang.Object
  extended by org.dllearner.core.AbstractComponent
      extended by org.dllearner.core.AbstractCELA
          extended by org.dllearner.algorithms.ocel.OCEL
All Implemented Interfaces:
ClassExpressionLearningAlgorithm, Component, LearningAlgorithm, StoppableLearningAlgorithm

public class OCEL
extends AbstractCELA

The DL-Learner learning algorithm component for the example based refinement operator approach. It handles all configuration options, creates the corresponding objects and passes them to the actual refinement operator, heuristic, and learning algorithm implementations. Note: The options supported by the ROLearner component and this one are not equal. Options that have been dropped for now: - horizontal expansion factor: The goal of the algorithm will be to (hopefully) be able to learn long and complex concepts more efficiently. A horizontal expansion factor has its benefits, but limits the length of concepts learnable in reasonable time to about 15 with its default value of 0.6 and a small sized background knowledge base. We hope to get more fine-grained control of whether it makes sense to extend a node with more sophisticated heuristics. Dropping the horizontal expansion factor means that the completeness of the algorithm depends on the heuristic.

Author:
Jens Lehmann

Field Summary
 
Fields inherited from class org.dllearner.core.AbstractCELA
MAX_NR_OF_RESULTS
 
Constructor Summary
OCEL(PosNegLP learningProblem, AbstractReasonerComponent reasoningService)
           
OCEL(PosOnlyLP learningProblem, AbstractReasonerComponent reasoningService)
           
 
Method Summary
<T> void
applyConfigEntry(ConfigEntry<T> entry)
          Applies a configuration option to this component.
static Collection<ConfigOption<?>> createConfigOptions()
           
 OCELConfigurator getConfigurator()
          For each component, a configurator class is generated in package org.dllearner.core.configurators using the script { org.dllearner.scripts.ConfigJavaGenerator}.
 Description getCurrentlyBestDescription()
           
 List<Description> getCurrentlyBestDescriptions()
           
 EvaluatedDescriptionPosNeg getCurrentlyBestEvaluatedDescription()
          Returns the best descriptions obtained so far.
 TreeSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions()
          Returns a sorted set of the best descriptions found so far.
static String getName()
           
 RhoDRDown getRefinementOperator()
           
 ScorePosNeg getSolutionScore()
           
 ExampleBasedNode getStartNode()
           
static String getUsage()
           
 void init()
          Method to be called after the component has been configured.
 boolean isRunning()
          Returns whether the learning algorithm is running.
 void start()
          Starts the algorithm.
 void stop()
          Stops the algorithm gracefully.
static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems()
           
 
Methods inherited from class org.dllearner.core.AbstractCELA
changeLearningProblem, changeReasonerComponent, getCurrentlyBestDescriptions, getCurrentlyBestDescriptions, getCurrentlyBestEvaluatedDescriptions, getCurrentlyBestEvaluatedDescriptions, getCurrentlyBestEvaluatedDescriptions, getCurrentlyBestMostGeneralEvaluatedDescriptions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OCEL

public OCEL(PosNegLP learningProblem,
            AbstractReasonerComponent reasoningService)

OCEL

public OCEL(PosOnlyLP learningProblem,
            AbstractReasonerComponent reasoningService)
Method Detail

getConfigurator

public OCELConfigurator getConfigurator()
Description copied from class: AbstractComponent
For each component, a configurator class is generated in package org.dllearner.core.configurators using the script { org.dllearner.scripts.ConfigJavaGenerator}. The configurator provides set and get methods for the configuration options of a component.

Specified by:
getConfigurator in class AbstractComponent
Returns:
An object allowing to configure this component.

supportedLearningProblems

public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems()

createConfigOptions

public static Collection<ConfigOption<?>> createConfigOptions()

applyConfigEntry

public <T> void applyConfigEntry(ConfigEntry<T> entry)
                      throws InvalidConfigOptionValueException
Description copied from class: AbstractComponent
Applies a configuration option to this component. Implementations of components should use option and value of the config entry to perform an action (usually setting an internal variable to an appropriate value). Since the availability of configurators, it is optional for components to implement this method. Instead of using this method to take an action based on a configuration value, components can also use the getters defined in the components configurator. Important note: Never call this method directly. All calls are done via the ComponentManager.

Type Parameters:
T - Type of the config entry (Integer, String etc.).
Parameters:
entry - A configuration entry.
Throws:
InvalidConfigOptionValueException - This exception is thrown if the value of the config entry is not valid. For instance, a config option may only accept values, which are within intervals 0.1 to 0.3 or 0.5 to 0.8. If the value is outside of those intervals, an exception is thrown. Note that many of the common cases are already caught in the constructor of ConfigEntry (for instance for a DoubleConfigOption you can specify an interval for the value). This means that, as a component developer, you often do not need to implement further validity checks.
See Also:
AbstractComponent.getConfigurator()

init

public void init()
          throws ComponentInitException
Description copied from interface: Component
Method to be called after the component has been configured. Implementation of components can overwrite this method to perform setup and initialisation tasks for this component.

Throws:
ComponentInitException - This exception is thrown if any exceptions occur within the initialisation process of this component. As component developer, you are encouraged to rethrow occuring exception as ComponentInitException and giving an error message as well as the actualy exception by using the constructor ComponentInitException.ComponentInitException(String, Throwable).

getName

public static String getName()

getUsage

public static String getUsage()

start

public void start()
Description copied from interface: LearningAlgorithm
Starts the algorithm. It runs until paused, stopped, or a termination criterion has been reached.


getSolutionScore

public ScorePosNeg getSolutionScore()

getCurrentlyBestDescription

public Description getCurrentlyBestDescription()
Specified by:
getCurrentlyBestDescription in class AbstractCELA
Returns:
The best class description found by the learning algorithm so far.
See Also:
AbstractCELA.getCurrentlyBestEvaluatedDescription()

getCurrentlyBestDescriptions

public List<Description> getCurrentlyBestDescriptions()
Overrides:
getCurrentlyBestDescriptions in class AbstractCELA
Returns:
The best class descriptions found by the learning algorithm so far.
See Also:
AbstractCELA.getCurrentlyBestEvaluatedDescriptions()

getCurrentlyBestEvaluatedDescription

public EvaluatedDescriptionPosNeg getCurrentlyBestEvaluatedDescription()
Description copied from class: AbstractCELA
Returns the best descriptions obtained so far.

Specified by:
getCurrentlyBestEvaluatedDescription in class AbstractCELA
Returns:
Best class description found so far.

getCurrentlyBestEvaluatedDescriptions

public TreeSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions()
Description copied from class: AbstractCELA
Returns a sorted set of the best descriptions found so far. We assume that they are ordered such that the best ones come in last. (In Java, iterators traverse a SortedSet in ascending order.)

Overrides:
getCurrentlyBestEvaluatedDescriptions in class AbstractCELA
Returns:
Best class descriptions found so far.

stop

public void stop()
Stops the algorithm gracefully. A stopped algorithm cannot be resumed anymore. Use this method for cleanup and freeing memory.


getStartNode

public ExampleBasedNode getStartNode()

isRunning

public boolean isRunning()
Returns whether the learning algorithm is running. Implementation should use a boolean status variable in their implementations of the start and resume methods.

Returns:
True if the algorithm is running, false otherwise.

getRefinementOperator

public RhoDRDown getRefinementOperator()


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann