public class PosNegLPStrict extends PosNegLP
Constructor and Description |
---|
PosNegLPStrict() |
PosNegLPStrict(AbstractReasonerComponent reasoningService) |
Modifier and Type | Method and Description |
---|---|
ScorePosNeg |
computeScore(org.semanticweb.owlapi.model.OWLClassExpression concept)
Computes the
Score of a given hypothesis
with respect to this learning problem. |
ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual> |
computeScore(org.semanticweb.owlapi.model.OWLClassExpression ce,
double noise)
Computes the
Score of a given hypothesis
with respect to this learning problem. |
EvaluatedDescription |
evaluate(org.semanticweb.owlapi.model.OWLClassExpression description)
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(org.semanticweb.owlapi.model.OWLClassExpression description,
double minAccuracy)
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 |
getAccuracyPenalty() |
double |
getErrorPenalty() |
Set<org.semanticweb.owlapi.model.OWLIndividual> |
getNeutralExamples() |
void |
init()
Method to be called after the component has been configured.
|
boolean |
isPenaliseNeutralExamples() |
void |
setAccuracyPenalty(double accuracyPenalty) |
void |
setErrorPenalty(double errorPenalty) |
void |
setPenaliseNeutralExamples(boolean penaliseNeutralExamples) |
getAccuracyMethod, getNegativeExamples, getPercentPerLengthUnit, getPositiveExamples, isUseRetrievalForClassification, setAccuracyMethod, setNegativeExamples, setPercentPerLengthUnit, setPositiveExamples, setUseRetrievalForClassification
changeReasonerComponent, getExampleLoaderHelper, getReasoningUtil, setExampleLoaderHelper, setReasoner, setReasoningUtil
evaluate, getAccuracyOrTooWeak, getReasoner
isInitialized
public PosNegLPStrict(AbstractReasonerComponent reasoningService)
public PosNegLPStrict()
public void setAccuracyPenalty(double accuracyPenalty)
public void setErrorPenalty(double errorPenalty)
public void setPenaliseNeutralExamples(boolean penaliseNeutralExamples)
public void init() throws ComponentInitException
Component
init
in interface Component
init
in class PosNegLP
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 ScorePosNeg computeScore(org.semanticweb.owlapi.model.OWLClassExpression concept)
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<ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual>,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual>>>
concept
- A hypothesis (as solution candidate for this learning problem).Score
object.public ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual> computeScore(org.semanticweb.owlapi.model.OWLClassExpression ce, 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<ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual>,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual>>>
ce
- A hypothesis (as solution candidate for this learning problem).noise
- the (approximated) value of noise within the examplesScore
object.public Set<org.semanticweb.owlapi.model.OWLIndividual> getNeutralExamples()
public double getAccuracyPenalty()
public double getErrorPenalty()
public boolean isPenaliseNeutralExamples()
public double getAccuracyOrTooWeak(org.semanticweb.owlapi.model.OWLClassExpression description, double minAccuracy)
AbstractLearningProblem
getAccuracyOrTooWeak
in class AbstractLearningProblem<ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual>,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual>>>
public EvaluatedDescription evaluate(org.semanticweb.owlapi.model.OWLClassExpression description)
AbstractLearningProblem
evaluate
in class AbstractLearningProblem<ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual>,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ScorePosNeg<org.semanticweb.owlapi.model.OWLNamedIndividual>>>
description
- Hypothesis to evaluate. DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann