public class ClassAsInstanceLearningProblem extends AbstractClassExpressionLearningProblem<ScorePosNeg<org.semanticweb.owlapi.model.OWLClass>>
| Constructor and Description |
|---|
ClassAsInstanceLearningProblem() |
| Modifier and Type | Method and Description |
|---|---|
ScorePosNeg<org.semanticweb.owlapi.model.OWLClass> |
computeScore(org.semanticweb.owlapi.model.OWLClassExpression description,
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 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 |
getAccuracyOrTooWeakExact(org.semanticweb.owlapi.model.OWLClassExpression description,
double noise) |
double |
getFMeasureOrTooWeakExact(org.semanticweb.owlapi.model.OWLClassExpression description,
double noise) |
Set<org.semanticweb.owlapi.model.OWLClass> |
getNegativeExamples() |
double |
getPercentPerLengthUnit() |
Set<org.semanticweb.owlapi.model.OWLClass> |
getPositiveExamples() |
double |
getPredAccuracyOrTooWeakExact(org.semanticweb.owlapi.model.OWLClassExpression description,
double noise) |
void |
init()
Method to be called after the component has been configured.
|
static void |
main(String[] args) |
void |
setNegativeExamples(Set<org.semanticweb.owlapi.model.OWLClass> negativeExamples) |
void |
setPercentPerLengthUnit(double percentPerLengthUnit) |
void |
setPositiveExamples(Set<org.semanticweb.owlapi.model.OWLClass> positiveExamples) |
changeReasonerComponent, getExampleLoaderHelper, getReasoningUtil, setExampleLoaderHelper, setReasoner, setReasoningUtilcomputeScore, evaluate, getAccuracyOrTooWeak, getReasonerisInitializedpublic ClassAsInstanceLearningProblem()
public void init() throws ComponentInitException
ComponentComponentInitException - 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<org.semanticweb.owlapi.model.OWLClass> computeScore(org.semanticweb.owlapi.model.OWLClassExpression description, double noise)
AbstractLearningProblemScore 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.OWLClass>,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ScorePosNeg<org.semanticweb.owlapi.model.OWLClass>>>description - A hypothesis (as solution candidate for this learning problem).noise - the (approximated) value of noise within the examplesScore object.public EvaluatedDescription evaluate(org.semanticweb.owlapi.model.OWLClassExpression description)
AbstractLearningProblemevaluate in class AbstractLearningProblem<ScorePosNeg<org.semanticweb.owlapi.model.OWLClass>,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ScorePosNeg<org.semanticweb.owlapi.model.OWLClass>>>description - Hypothesis to evaluate.public double getAccuracyOrTooWeak(org.semanticweb.owlapi.model.OWLClassExpression description, double noise)
AbstractLearningProblemgetAccuracyOrTooWeak in class AbstractLearningProblem<ScorePosNeg<org.semanticweb.owlapi.model.OWLClass>,org.semanticweb.owlapi.model.OWLClassExpression,EvaluatedDescription<ScorePosNeg<org.semanticweb.owlapi.model.OWLClass>>>public double getAccuracyOrTooWeakExact(org.semanticweb.owlapi.model.OWLClassExpression description, double noise)
public double getPredAccuracyOrTooWeakExact(org.semanticweb.owlapi.model.OWLClassExpression description, double noise)
public double getFMeasureOrTooWeakExact(org.semanticweb.owlapi.model.OWLClassExpression description, double noise)
public void setPositiveExamples(Set<org.semanticweb.owlapi.model.OWLClass> positiveExamples)
positiveExamples - the positiveExamples to setpublic Set<org.semanticweb.owlapi.model.OWLClass> getPositiveExamples()
public void setNegativeExamples(Set<org.semanticweb.owlapi.model.OWLClass> negativeExamples)
negativeExamples - the negativeExamples to setpublic Set<org.semanticweb.owlapi.model.OWLClass> getNegativeExamples()
public double getPercentPerLengthUnit()
public void setPercentPerLengthUnit(double percentPerLengthUnit)
percentPerLengthUnit - the percentPerLengthUnit to set
DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2019 Jens Lehmann