public class ClassLearningProblem extends AbstractClassExpressionLearningProblem<ClassScore>
Constructor and Description |
---|
ClassLearningProblem() |
ClassLearningProblem(AbstractReasonerComponent reasoner) |
Modifier and Type | Method and Description |
---|---|
ClassScore |
computeScore(org.semanticweb.owlapi.model.OWLClassExpression description,
double noise)
Computes the
Score of a given hypothesis
with respect to this learning problem. |
EvaluatedDescriptionClass |
evaluate(org.semanticweb.owlapi.model.OWLClassExpression description,
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).
|
boolean |
followsFromKB(org.semanticweb.owlapi.model.OWLClassExpression description) |
AccMethod |
getAccuracyMethod() |
double |
getAccuracyOrTooWeak(org.semanticweb.owlapi.model.OWLClassExpression description,
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.
|
double |
getBetaEq() |
double |
getBetaSC() |
org.semanticweb.owlapi.model.OWLClass |
getClassToDescribe() |
int |
getMaxExecutionTimeInSeconds() |
double |
getRecall(org.semanticweb.owlapi.model.OWLClassExpression description) |
void |
init()
Method to be called after the component has been configured.
|
boolean |
isCheckConsistency() |
boolean |
isConsistent(org.semanticweb.owlapi.model.OWLClassExpression description) |
boolean |
isEquivalence() |
boolean |
isEquivalenceProblem() |
void |
setAccuracyMethod(AccMethod accuracyMethod) |
void |
setBetaEq(double betaEq) |
void |
setBetaSC(double betaSC) |
void |
setCheckConsistency(boolean checkConsistency) |
void |
setClassToDescribe(org.semanticweb.owlapi.model.IRI classIRI) |
void |
setClassToDescribe(org.semanticweb.owlapi.model.OWLClass classToDescribe) |
void |
setEquivalence(boolean equivalence) |
void |
setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds) |
boolean |
terminationTimeExpired() |
changeReasonerComponent, getExampleLoaderHelper, getReasoningUtil, setExampleLoaderHelper, setReasoner, setReasoningUtil
computeScore, evaluate, getAccuracyOrTooWeak, getReasoner
isInitialized
public ClassLearningProblem()
public ClassLearningProblem(AbstractReasonerComponent reasoner)
public void init() throws ComponentInitException
Component
ComponentInitException
- This exception is thrown if any
exceptions occur within the initialisation process of this
component. As component developer, you are encouraged to
re-throw occurring exception as ComponentInitException and
giving an error message as well as the actually exception by
using the constructor ComponentInitException(String, Throwable)
.public ClassScore computeScore(org.semanticweb.owlapi.model.OWLClassExpression description, double noise)
AbstractLearningProblem
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.computeScore
in class AbstractLearningProblem<ClassScore,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ClassScore>>
description
- A hypothesis (as solution candidate for this learning problem).noise
- the (approximated) value of noise within the examplesScore
object.public boolean isEquivalenceProblem()
public double getAccuracyOrTooWeak(org.semanticweb.owlapi.model.OWLClassExpression description, double noise)
AbstractLearningProblem
getAccuracyOrTooWeak
in class AbstractLearningProblem<ClassScore,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ClassScore>>
public boolean terminationTimeExpired()
public org.semanticweb.owlapi.model.OWLClass getClassToDescribe()
public void setClassToDescribe(org.semanticweb.owlapi.model.OWLClass classToDescribe)
public void setClassToDescribe(org.semanticweb.owlapi.model.IRI classIRI)
public EvaluatedDescriptionClass evaluate(org.semanticweb.owlapi.model.OWLClassExpression description, double noise)
AbstractLearningProblem
evaluate
in class AbstractLearningProblem<ClassScore,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ClassScore>>
description
- Hypothesis to evaluate.noise
- the (approximated) value of noise within the examplespublic boolean isConsistent(org.semanticweb.owlapi.model.OWLClassExpression description)
public boolean followsFromKB(org.semanticweb.owlapi.model.OWLClassExpression description)
public int getMaxExecutionTimeInSeconds()
public void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds)
public boolean isEquivalence()
public void setEquivalence(boolean equivalence)
public double getBetaSC()
public void setBetaSC(double betaSC)
public double getBetaEq()
public void setBetaEq(double betaEq)
public boolean isCheckConsistency()
public void setCheckConsistency(boolean checkConsistency)
public AccMethod getAccuracyMethod()
@Autowired(required=false) public void setAccuracyMethod(AccMethod accuracyMethod)
public double getRecall(org.semanticweb.owlapi.model.OWLClassExpression description)
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann