org.dllearner.algorithms.refinement
Class ROLearner

java.lang.Object
  extended by org.dllearner.core.Component
      extended by org.dllearner.core.LearningAlgorithm
          extended by org.dllearner.algorithms.refinement.ROLearner

public class ROLearner
extends LearningAlgorithm


Nested Class Summary
static class ROLearner.Heuristic
           
 
Field Summary
 
Fields inherited from class org.dllearner.core.LearningAlgorithm
MAX_NR_OF_RESULTS
 
Constructor Summary
ROLearner(PosNegLP learningProblem, ReasonerComponent reasoningService)
           
 
Method Summary
<T> void
applyConfigEntry(ConfigEntry<T> entry)
          Applies a configuration option to this component.
static Collection<ConfigOption<?>> createConfigOptions()
           
 ROLearnerConfigurator getConfigurator()
          For each component, a configurator class is generated in package org.dllearner.core.configurators using the script ConfigJavaGenerator.
 Description getCurrentlyBestDescription()
           
 List<Description> getCurrentlyBestDescriptions(int nrOfSolutions)
           
 EvaluatedDescriptionPosNeg getCurrentlyBestEvaluatedDescription()
          Returns the best descriptions obtained so far.
 SortedSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions()
          Returns a sorted set of the best descriptions found so far.
static String getName()
           
 ScorePosNeg getSolutionScore()
           
 ScorePosNeg getSolutionScore(Description d)
           
 Node getStartNode()
           
 void init()
          Method to be called after the component has been configured.
 boolean isRunning()
          Returns whether the learning algorithm is running.
 void printBestSolutions(int nrOfSolutions)
           
 void start()
          Starts the algorithm.
 void stop()
          Stops the algorithm gracefully.
static Collection<Class<? extends LearningProblem>> supportedLearningProblems()
           
 
Methods inherited from class org.dllearner.core.LearningAlgorithm
changeLearningProblem, changeReasonerComponent, getCurrentlyBestDescriptions, getCurrentlyBestDescriptions, getCurrentlyBestEvaluatedDescriptions, getCurrentlyBestEvaluatedDescriptions, getCurrentlyBestEvaluatedDescriptions, pause, resume
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ROLearner

public ROLearner(PosNegLP learningProblem,
                 ReasonerComponent reasoningService)
Method Detail

getConfigurator

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

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

supportedLearningProblems

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

createConfigOptions

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

applyConfigEntry

public <T> void applyConfigEntry(ConfigEntry<T> entry)
                      throws InvalidConfigOptionValueException
Description copied from class: Component
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:
Component.getConfigurator()

init

public void init()
Description copied from class: 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.

Specified by:
init in class Component

getName

public static String getName()

start

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

Specified by:
start in class LearningAlgorithm

getCurrentlyBestDescription

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

getCurrentlyBestEvaluatedDescription

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

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

getCurrentlyBestEvaluatedDescriptions

public SortedSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions()
Description copied from class: LearningAlgorithm
Returns a sorted set of the best descriptions found so far. We assume that they are ordered such that the best ones come in first.

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

printBestSolutions

public void printBestSolutions(int nrOfSolutions)

getCurrentlyBestDescriptions

public List<Description> getCurrentlyBestDescriptions(int nrOfSolutions)
Overrides:
getCurrentlyBestDescriptions in class LearningAlgorithm
Parameters:
nrOfSolutions - Limit for the number or returned descriptions.
Returns:
The best class descriptions found by the learning algorithm so far.
See Also:
LearningAlgorithm.getCurrentlyBestEvaluatedDescriptions(int)

getSolutionScore

public ScorePosNeg getSolutionScore()

getSolutionScore

public ScorePosNeg getSolutionScore(Description d)

stop

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

Specified by:
stop in class LearningAlgorithm

getStartNode

public Node getStartNode()
Returns:
the startNode

isRunning

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

Specified by:
isRunning in class LearningAlgorithm
Returns:
True if the algorithm is running, false otherwise.


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