org.dllearner.learningproblems
Class EvaluatedDescriptionPosNeg

java.lang.Object
  extended by org.dllearner.core.EvaluatedDescription
      extended by org.dllearner.learningproblems.EvaluatedDescriptionPosNeg

public class EvaluatedDescriptionPosNeg
extends EvaluatedDescription

This represents a class description, which has been evaluated by the learning algorithm, i.e. it has been checked which examples it covers. It can be used as return value for learning algorithms to make it easier for applications to assess how good an offered class description is and how it classifies particular examples.

Author:
Jens Lehmann

Constructor Summary
EvaluatedDescriptionPosNeg(Description description, ScorePosNeg score)
          Constructs an evaluated description using its score.
EvaluatedDescriptionPosNeg(Description description, Set<Individual> posAsPos, Set<Individual> posAsNeg, Set<Individual> negAsPos, Set<Individual> negAsNeg)
          Constructs an evaluated description using example coverage.
 
Method Summary
 String asJSON()
          This convenience method can be used to store and exchange evaluated descriptions by transforming them to a JSON string.
 double getAccuracy()
           
 Set<Individual> getCoveredNegatives()
           
 Set<Individual> getCoveredPositives()
           
 Set<Individual> getNotCoveredNegatives()
           
 Set<Individual> getNotCoveredPositives()
           
 ScorePosNeg getScore()
          Gets the score of this description.
 String toString()
           
 
Methods inherited from class org.dllearner.core.EvaluatedDescription
getDescription, getDescriptionDepth, getDescriptionLength, getSparqlQuery, setDescription
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EvaluatedDescriptionPosNeg

public EvaluatedDescriptionPosNeg(Description description,
                                  ScorePosNeg score)
Constructs an evaluated description using its score.

Parameters:
description - The description, which was evaluated.
score - The score of the description.

EvaluatedDescriptionPosNeg

public EvaluatedDescriptionPosNeg(Description description,
                                  Set<Individual> posAsPos,
                                  Set<Individual> posAsNeg,
                                  Set<Individual> negAsPos,
                                  Set<Individual> negAsNeg)
Constructs an evaluated description using example coverage.

Parameters:
description - The description, which was evaluated.
posAsPos - Positive examples classified as positive by (i.e. instance of) the description.
posAsNeg - Positive examples classified as negative by (i.e. not instance of) the description.
negAsPos - Negative examples classified as positive by (i.e. instance of) the description.
negAsNeg - Negative examples classified as negative by (i.e. not instance of) the description.
Method Detail

getAccuracy

public double getAccuracy()
Overrides:
getAccuracy in class EvaluatedDescription
Returns:
Accuracy of the description.
See Also:
Score.getAccuracy()

getScore

public ScorePosNeg getScore()
Gets the score of this description. This can be used to get further statistical values.

Returns:
The score object associated with this evaluated description.
See Also:
ScorePosNeg

getCoveredNegatives

public Set<Individual> getCoveredNegatives()
Returns:
Negative examples covered by the description.
See Also:
ScorePosNeg.getCoveredNegatives()

getCoveredPositives

public Set<Individual> getCoveredPositives()
Returns:
Positive examples covered by the description.
See Also:
ScorePosNeg.getCoveredPositives()

getNotCoveredNegatives

public Set<Individual> getNotCoveredNegatives()
Returns:
Negative examples not covered by the description.
See Also:
ScorePosNeg.getNotCoveredNegatives()

getNotCoveredPositives

public Set<Individual> getNotCoveredPositives()
Returns:
Positive examples not covered by the description.
See Also:
ScorePosNeg.getNotCoveredPositives()

asJSON

public String asJSON()
This convenience method can be used to store and exchange evaluated descriptions by transforming them to a JSON string.

Overrides:
asJSON in class EvaluatedDescription
Returns:
A JSON representation of an evaluated description.

toString

public String toString()
Overrides:
toString in class EvaluatedDescription


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