org.dllearner.learningproblems
Class ClassLearningProblem

java.lang.Object
  extended by org.dllearner.core.Component
      extended by org.dllearner.core.LearningProblem
          extended by org.dllearner.learningproblems.ClassLearningProblem

public class ClassLearningProblem
extends LearningProblem

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

Author:
Jens Lehmann

Constructor Summary
ClassLearningProblem(ReasonerComponent reasoner)
           
 
Method Summary
 ClassScore computeScore(Description description)
          Computes the fraction of the instances of the class to learn, which is covered by the given description.
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).
 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 LearningProblem.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 getAccuracyOrTooWeakStandard(Description description, double minAccuracy)
          Deprecated. 
 NamedClass getClassToDescribe()
           
 ClassLearningProblemConfigurator getConfigurator()
          For each component, a configurator class is generated in package org.dllearner.core.configurators using the script ConfigJavaGenerator.
static String getName()
           
 void init()
          Method to be called after the component has been configured.
 boolean isConsistent(Description description)
           
 boolean isEquivalenceProblem()
           
 
Methods inherited from class org.dllearner.core.LearningProblem
changeReasonerComponent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLearningProblem

public ClassLearningProblem(ReasonerComponent reasoner)
Method Detail

getConfigurator

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

createConfigOptions

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

getName

public static String getName()

init

public void init()
          throws ComponentInitException
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
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)
Computes the fraction of the instances of the class to learn, which is covered by the given description.

Specified by:
computeScore in class LearningProblem
Parameters:
description - The description for which to compute coverage.
Returns:
The class coverage (between 0 and 1).

isEquivalenceProblem

public boolean isEquivalenceProblem()

getAccuracy

public double getAccuracy(Description description)
Description copied from class: LearningProblem
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 LearningProblem
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: LearningProblem
This method computes the accuracy as LearningProblem.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 LearningProblem
Returns:
A value between 0 and 1 indicating the quality (of a class description) or -1 as described above.

getAccuracyOrTooWeakStandard

@Deprecated
public double getAccuracyOrTooWeakStandard(Description description,
                                                      double minAccuracy)
Deprecated. 


getClassToDescribe

public NamedClass getClassToDescribe()
Returns:
the classToDescribe

evaluate

public EvaluatedDescriptionClass evaluate(Description description)
Description copied from class: LearningProblem
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 LearningProblem
Parameters:
description - Description to evaluate.
Returns:

isConsistent

public boolean isConsistent(Description description)
Returns:
the isConsistent


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