org.dllearner.learningproblems
Class ClassLearningProblem

java.lang.Object
  extended by org.dllearner.core.AbstractComponent
      extended by org.dllearner.core.AbstractLearningProblem
          extended by org.dllearner.learningproblems.ClassLearningProblem
All Implemented Interfaces:
Component, LearningProblem

public class ClassLearningProblem
extends AbstractLearningProblem

The problem of learning the description of an existing class in an OWL ontology.

Author:
Jens Lehmann

Constructor Summary
ClassLearningProblem(AbstractReasonerComponent reasoner)
           
 
Method Summary
 ClassScore computeScore(Description description)
          Computes the Score of a given class description with respect to this learning problem.
static Collection<ConfigOption<?>> createConfigOptions()
           
 EvaluatedDescriptionClass 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).
 boolean followsFromKB(Description description)
           
 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.
 double getAccuracyOrTooWeakApprox(Description description, double noise)
           
 double getAccuracyOrTooWeakExact(Description description, double noise)
           
 NamedClass getClassToDescribe()
           
 double getComissionError()
           
 ClassLearningProblemConfigurator getConfigurator()
          For each component, a configurator class is generated in package org.dllearner.core.configurators using the script { org.dllearner.scripts.ConfigJavaGenerator}.
 double getGeneralisedPrecision()
           
 double getGeneralisedRecall()
           
 double getInductionRate()
           
 double getMatchRate()
           
static String getName()
           
 double getOmissionError()
           
 double getPrecision(Description description)
           
 double getPredictiveAccuracy()
           
 double getRecall(Description description)
           
 void init()
          Method to be called after the component has been configured.
 boolean isConsistent(Description description)
           
 boolean isEquivalenceProblem()
           
static double p1(int success, int total)
           
static double p3(double p1, int total)
           
 
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

ClassLearningProblem

public ClassLearningProblem(AbstractReasonerComponent reasoner)
Method Detail

getConfigurator

public ClassLearningProblemConfigurator 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.

createConfigOptions

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

getName

public static String getName()

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).

computeScore

public ClassScore computeScore(Description description)
Description copied from class: AbstractLearningProblem
Computes the Score 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.

Specified by:
computeScore in class AbstractLearningProblem
Parameters:
description - A class description (as solution candidate for this learning problem).
Returns:
A Score object.

isEquivalenceProblem

public boolean isEquivalenceProblem()

getAccuracy

public double getAccuracy(Description description)
Description copied from class: AbstractLearningProblem
This method returns a value, which indicates how accurate a class description solves a learning problem. There can be different ways to compute accuracy depending on the type of learning problem and other factors. However, all implementations are required to return a value between 0 and 1, where 1 stands for the highest possible accuracy and 0 for the lowest possible accuracy.

Specified by:
getAccuracy in class AbstractLearningProblem
Returns:
A value between 0 and 1 indicating the quality (of a class description).

getAccuracyOrTooWeak

public double getAccuracyOrTooWeak(Description description,
                                   double noise)
Description copied from class: AbstractLearningProblem
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. 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.

Specified by:
getAccuracyOrTooWeak in class AbstractLearningProblem
Returns:
A value between 0 and 1 indicating the quality (of a class description) or -1 as described above.

getAccuracyOrTooWeakApprox

public double getAccuracyOrTooWeakApprox(Description description,
                                         double noise)

getAccuracyOrTooWeakExact

public double getAccuracyOrTooWeakExact(Description description,
                                        double noise)

getRecall

public double getRecall(Description description)

getPrecision

public double getPrecision(Description description)

getPredictiveAccuracy

public double getPredictiveAccuracy()

getMatchRate

public double getMatchRate()

getOmissionError

public double getOmissionError()

getInductionRate

public double getInductionRate()

getComissionError

public double getComissionError()

getGeneralisedRecall

public double getGeneralisedRecall()

getGeneralisedPrecision

public double getGeneralisedPrecision()

p3

public static double p3(double p1,
                        int total)

p1

public static double p1(int success,
                        int total)

getClassToDescribe

public NamedClass getClassToDescribe()
Returns:
the classToDescribe

evaluate

public EvaluatedDescriptionClass evaluate(Description description)
Description copied from class: AbstractLearningProblem
Evaluates the description by computing the score and returning an evaluated description of the correct type (ClassLearningProblem returns EvaluatedDescriptionClass instead of generic EvaluatedDescription).

Specified by:
evaluate in class AbstractLearningProblem
Parameters:
description - Description to evaluate.
Returns:

isConsistent

public boolean isConsistent(Description description)
Returns:
the isConsistent

followsFromKB

public boolean followsFromKB(Description description)


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