|
|||||||||
| 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.AbstractCELA
public abstract class AbstractCELA
Abstract superclass of all class expression learning algorithm implementations. Includes support for anytime learning algorithms and resumable learning algorithms. Provides methods for filtering the best descriptions found by the algorithm. As results of the algorithm, you can either get only descriptions or evaluated descriptions. Evaluated descriptions have information about accuracy and example coverage associated with them. However, retrieving those may require addition reasoner queries, because the learning algorithms usually use but do not necessarily store this information. Changes (March/April 2011): Learning algorithms no longer have to use this class, but it still serves as a prototypical template for class expression learning algorithms.
| Field Summary | |
|---|---|
static int |
MAX_NR_OF_RESULTS
This is the maximum number of results, which the learning algorithms are asked to store. |
| Constructor Summary | |
|---|---|
AbstractCELA(AbstractLearningProblem learningProblem,
AbstractReasonerComponent reasoningService)
Each learning algorithm gets a learning problem and a reasoner as input. |
|
| Method Summary | |
|---|---|
void |
changeLearningProblem(AbstractLearningProblem learningProblem)
Call this when you want to change the learning problem, but leave everything else as is. |
void |
changeReasonerComponent(AbstractReasonerComponent reasoningService)
Call this when you want to change the reasoning service, but leave everything else as is. |
abstract Description |
getCurrentlyBestDescription()
|
List<Description> |
getCurrentlyBestDescriptions()
|
List<Description> |
getCurrentlyBestDescriptions(int nrOfDescriptions)
|
List<Description> |
getCurrentlyBestDescriptions(int nrOfDescriptions,
boolean filterNonMinimalDescriptions)
|
abstract EvaluatedDescription |
getCurrentlyBestEvaluatedDescription()
Returns the best descriptions obtained so far. |
TreeSet<? extends EvaluatedDescription> |
getCurrentlyBestEvaluatedDescriptions()
Returns a sorted set of the best descriptions found so far. |
List<? extends EvaluatedDescription> |
getCurrentlyBestEvaluatedDescriptions(double accuracyThreshold)
Returns a fraction of class descriptions with sufficiently high accuracy. |
List<? extends EvaluatedDescription> |
getCurrentlyBestEvaluatedDescriptions(int nrOfDescriptions)
Return the best currently found concepts up to some maximum count (no minimality filter used). |
List<? extends EvaluatedDescription> |
getCurrentlyBestEvaluatedDescriptions(int nrOfDescriptions,
double accuracyThreshold,
boolean filterNonMinimalDescriptions)
Returns a filtered list of currently best class descriptions. |
List<? extends EvaluatedDescription> |
getCurrentlyBestMostGeneralEvaluatedDescriptions()
|
static Collection<Class<? extends AbstractLearningProblem>> |
supportedLearningProblems()
Returns all learning problems supported by this component. |
| Methods inherited from class org.dllearner.core.AbstractComponent |
|---|
createConfigOptions, getConfigurator, getName |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.dllearner.core.StoppableLearningAlgorithm |
|---|
isRunning, stop |
| Methods inherited from interface org.dllearner.core.LearningAlgorithm |
|---|
start |
| Methods inherited from interface org.dllearner.core.Component |
|---|
init |
| Field Detail |
|---|
public static final int MAX_NR_OF_RESULTS
| Constructor Detail |
|---|
public AbstractCELA(AbstractLearningProblem learningProblem,
AbstractReasonerComponent reasoningService)
learningProblem - The learning problem to solve.reasoningService - The reasoner connecting to the
underlying knowledge base.| Method Detail |
|---|
public void changeLearningProblem(AbstractLearningProblem learningProblem)
learningProblem - The new learning problem.public void changeReasonerComponent(AbstractReasonerComponent reasoningService)
reasoningService - The new reasoning service.public abstract Description getCurrentlyBestDescription()
getCurrentlyBestEvaluatedDescription()public List<Description> getCurrentlyBestDescriptions()
getCurrentlyBestEvaluatedDescriptions()public List<Description> getCurrentlyBestDescriptions(int nrOfDescriptions)
getCurrentlyBestDescriptions in interface ClassExpressionLearningAlgorithmnrOfDescriptions - Limit for the number or returned descriptions.
getCurrentlyBestEvaluatedDescriptions(int)
public List<Description> getCurrentlyBestDescriptions(int nrOfDescriptions,
boolean filterNonMinimalDescriptions)
nrOfDescriptions - Limit for the number or returned descriptions.filterNonMinimalDescriptions - Remove non-minimal descriptions (e.g. those which can be shortened
to an equivalent concept) from the returned set.
getCurrentlyBestEvaluatedDescriptions(int,double,boolean)public abstract EvaluatedDescription getCurrentlyBestEvaluatedDescription()
public TreeSet<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions()
public List<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(int nrOfDescriptions,
double accuracyThreshold,
boolean filterNonMinimalDescriptions)
nrOfDescriptions - Maximum number of restrictions. Use Integer.MAX_VALUE
if you do not want this filter to be active.accuracyThreshold - Minimum accuracy. All class descriptions with lower
accuracy are disregarded. Specify a value between 0.0 and 1.0. Use 0.0 if
you do not want this filter to be active.filterNonMinimalDescriptions - If true, non-minimal descriptions are
filtered, e.g. ALL r.TOP (being equivalent to TOP), male AND male (can be
shortened to male). Currently, non-minimal descriptions are just skipped,
i.e. they are completely omitted from the return list. Later, implementation
might be changed to return shortened versions of those descriptions.
public List<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(int nrOfDescriptions)
getCurrentlyBestEvaluatedDescriptions in interface ClassExpressionLearningAlgorithmnrOfDescriptions - Maximum number of descriptions returned.
public List<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(double accuracyThreshold)
accuracyThreshold - Only return solutions with this accuracy or higher.
public List<? extends EvaluatedDescription> getCurrentlyBestMostGeneralEvaluatedDescriptions()
public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||