|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dllearner.core.Component
org.dllearner.core.LearningAlgorithm
org.dllearner.algorithms.refinement2.ROLComponent2
public class ROLComponent2
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.
| Field Summary |
|---|
| Fields inherited from class org.dllearner.core.LearningAlgorithm |
|---|
MAX_NR_OF_RESULTS |
| Constructor Summary | |
|---|---|
ROLComponent2(PosNegLP learningProblem,
ReasonerComponent reasoningService)
|
|
ROLComponent2(PosOnlyLP learningProblem,
ReasonerComponent reasoningService)
|
|
| Method Summary | ||
|---|---|---|
|
applyConfigEntry(ConfigEntry<T> entry)
Applies a configuration option to this component. |
|
static Collection<ConfigOption<?>> |
createConfigOptions()
|
|
ROLComponent2Configurator |
getConfigurator()
For each component, a configurator class is generated in package org.dllearner.core.configurators using the script ConfigJavaGenerator. |
|
Description |
getCurrentlyBestDescription()
|
|
List<Description> |
getCurrentlyBestDescriptions()
|
|
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()
|
|
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 |
pause()
Pauses the algorithm (not all algorithms need to implement this operation). |
|
void |
resume()
Resumes the algorithm (not all algorithms need to implement this operation). |
|
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ROLComponent2(PosNegLP learningProblem,
ReasonerComponent reasoningService)
public ROLComponent2(PosOnlyLP learningProblem,
ReasonerComponent reasoningService)
| Method Detail |
|---|
public ROLComponent2Configurator getConfigurator()
ComponentConfigJavaGenerator. The configurator
provides set and get methods for the configuration options of
a component.
getConfigurator in class Componentpublic static Collection<Class<? extends LearningProblem>> supportedLearningProblems()
public static Collection<ConfigOption<?>> createConfigOptions()
public <T> void applyConfigEntry(ConfigEntry<T> entry)
throws InvalidConfigOptionValueException
ComponentComponentManager.
T - Type of the config entry (Integer, String etc.).entry - A configuration entry.
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.Component.getConfigurator()
public void init()
throws ComponentInitException
Component
init in class ComponentComponentInitException - 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).public static String getName()
public static String getUsage()
public void start()
LearningAlgorithm
start in class LearningAlgorithmpublic ScorePosNeg getSolutionScore()
public Description getCurrentlyBestDescription()
getCurrentlyBestDescription in class LearningAlgorithmLearningAlgorithm.getCurrentlyBestEvaluatedDescription()public List<Description> getCurrentlyBestDescriptions()
getCurrentlyBestDescriptions in class LearningAlgorithmLearningAlgorithm.getCurrentlyBestEvaluatedDescriptions()public EvaluatedDescriptionPosNeg getCurrentlyBestEvaluatedDescription()
LearningAlgorithm
getCurrentlyBestEvaluatedDescription in class LearningAlgorithmpublic SortedSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions()
LearningAlgorithm
getCurrentlyBestEvaluatedDescriptions in class LearningAlgorithmpublic void stop()
stop in class LearningAlgorithmpublic ExampleBasedNode getStartNode()
public void pause()
pause in class LearningAlgorithmpublic void resume()
resume in class LearningAlgorithmpublic boolean isRunning()
isRunning in class LearningAlgorithm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||