public abstract class AbstractLearningProblem<T extends Score,V extends org.semanticweb.owlapi.model.OWLObject,W extends EvaluatedHypothesis<V,T>> extends AbstractComponent implements LearningProblem
Modifier and Type  Field and Description 

protected AbstractReasonerComponent 
reasoner 
initialized
Constructor and Description 

AbstractLearningProblem() 
AbstractLearningProblem(AbstractReasonerComponent reasoner)
Constructs a learning problem using a reasoning service for
querying the background knowledge.

Modifier and Type  Method and Description 

void 
changeReasonerComponent(AbstractReasonerComponent reasoner)
Method to exchange the reasoner underlying the learning
problem.

T 
computeScore(V hypothesis)
Computes the
Score of a given hypothesis
with respect to this learning problem. 
abstract T 
computeScore(V hypothesis,
double noise)
Computes the
Score of a given hypothesis
with respect to this learning problem. 
W 
evaluate(V hypothesis)
Evaluates the hypothesis by computing the score and returning an
evaluated hypothesis of the correct type (ClassLearningProblem
returns EvaluatedDescriptionClass instead of generic EvaluatedDescription).

W 
evaluate(V hypothesis,
double noise)
Evaluates the hypothesis by computing the score and returning an
evaluated hypothesis of the correct type (ClassLearningProblem
returns EvaluatedDescriptionClass instead of generic EvaluatedDescription).

double 
getAccuracyOrTooWeak(V object)
This method returns a value, which indicates how accurate a
hypothesis solves a learning problem.

abstract double 
getAccuracyOrTooWeak(V hypothesis,
double noise)
This method computes the accuracy and returns 1 instead of the accuracy if
the accuracy of the hypothesis is below the given threshold and
the accuracy of all more special w.r.t.

AbstractReasonerComponent 
getReasoner()
Implementations of learning problems can use this class
variable to perform reasoner operations.

void 
setReasoner(AbstractReasonerComponent reasoner) 
isInitialized
protected AbstractReasonerComponent reasoner
public AbstractLearningProblem()
public AbstractLearningProblem(AbstractReasonerComponent reasoner)
reasoner
 The reasoning service used as
background knowledge.public void changeReasonerComponent(AbstractReasonerComponent reasoner)
reasoner
 New reasoning service.public T computeScore(V hypothesis)
Score
of a given hypothesis
with respect to this learning problem.
This can (but does not need to) be used by learning algorithms
to measure how good the hypothesis 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 hypotheses.hypothesis
 A hypothesis (as solution candidate for this learning problem).Score
object.public abstract T computeScore(V hypothesis, double noise)
Score
of a given hypothesis
with respect to this learning problem.
This can (but does not need to) be used by learning algorithms
to measure how good the hypothesis 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 hypotheses.hypothesis
 A hypothesis (as solution candidate for this learning problem).noise
 the (approximated) value of noise within the examplesScore
object.public W evaluate(V hypothesis)
hypothesis
 Hypothesis to evaluate.public W evaluate(V hypothesis, double noise)
hypothesis
 Hypothesis to evaluate.noise
 the (approximated) value of noise within the examplespublic double getAccuracyOrTooWeak(V object)
public abstract double getAccuracyOrTooWeak(V hypothesis, double noise)
public AbstractReasonerComponent getReasoner()
@Autowired(required=false) public void setReasoner(AbstractReasonerComponent reasoner)
Copyright © 2007–2016 AKSW, Department of Computer Science, University of Leipzig. All rights reserved.