|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dllearner.core.AbstractComponent
org.dllearner.core.AbstractLearningProblem
org.dllearner.learningproblems.PosOnlyLP
public class PosOnlyLP
A learning problem, where we learn from positive examples only.
| Constructor Summary | |
|---|---|
PosOnlyLP()
|
|
PosOnlyLP(AbstractReasonerComponent reasoningService)
|
|
| Method Summary | ||
|---|---|---|
|
applyConfigEntry(ConfigEntry<T> entry)
Applies a configuration option to this component. |
|
ScorePosOnly |
computeScore(Description description)
Computes the Score of a given class description
with respect to this learning problem. |
|
static Collection<ConfigOption<?>> |
createConfigOptions()
|
|
EvaluatedDescriptionPosOnly |
evaluate(Description description)
Evaluates the description by computing the score and returning an evaluated description of the correct type (ClassLearningProblem returns EvaluatedDescriptionClass instead of generic EvaluatedDescription). |
|
double |
getAccuracy(Description description)
This method returns a value, which indicates how accurate a class description solves a learning problem. |
|
double |
getAccuracyOrTooWeak(Description description,
double noise)
This method computes the accuracy as AbstractLearningProblem.getAccuracy(Description),
but returns -1 instead of the accuracy if 1.) the accuracy of the
description is below the given threshold and 2.) the accuracy of all
more special w.r.t. subsumption descriptions is below the given threshold. |
|
PosOnlyLPConfigurator |
getConfigurator()
For each component, a configurator class is generated in package org.dllearner.core.configurators using the script { org.dllearner.scripts.ConfigJavaGenerator}. |
|
static String |
getName()
|
|
SortedSet<Individual> |
getPositiveExamples()
|
|
void |
init()
Method to be called after the component has been configured. |
|
| Methods inherited from class org.dllearner.core.AbstractLearningProblem |
|---|
changeReasonerComponent |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PosOnlyLP()
public PosOnlyLP(AbstractReasonerComponent reasoningService)
| Method Detail |
|---|
public PosOnlyLPConfigurator getConfigurator()
AbstractComponent
getConfigurator in class AbstractComponent
public <T> void applyConfigEntry(ConfigEntry<T> entry)
throws InvalidConfigOptionValueException
AbstractComponentComponentManager.
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.AbstractComponent.getConfigurator()public static Collection<ConfigOption<?>> createConfigOptions()
public static String getName()
public void init()
Component
public SortedSet<Individual> getPositiveExamples()
public ScorePosOnly computeScore(Description description)
AbstractLearningProblemScore of a given class description
with respect to this learning problem.
This can (but does not need to) be used by learning algorithms
to measure how good the description fits the learning problem.
Score objects are used to store e.g. covered examples, accuracy etc.,
so often it is more efficient to only create score objects for
promising class descriptions.
computeScore in class AbstractLearningProblemdescription - A class description (as solution candidate for this learning problem).
public EvaluatedDescriptionPosOnly evaluate(Description description)
AbstractLearningProblem
evaluate in class AbstractLearningProblemdescription - Description to evaluate.
public double getAccuracy(Description description)
AbstractLearningProblem
getAccuracy in class AbstractLearningProblem
public double getAccuracyOrTooWeak(Description description,
double noise)
AbstractLearningProblemAbstractLearningProblem.getAccuracy(Description),
but returns -1 instead of the accuracy if 1.) the accuracy of the
description is below the given threshold and 2.) the accuracy of all
more special w.r.t. subsumption descriptions is below the given threshold.
This is used for efficiency reasons, i.e. -1 can be returned instantly if
it is clear that the description and all its refinements are not
sufficiently accurate.
getAccuracyOrTooWeak in class AbstractLearningProblem
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||