owltools.sim
Class MultiSimilarity

java.lang.Object
  extended by owltools.sim.Similarity
      extended by owltools.sim.MultiSimilarity

public class MultiSimilarity
extends Similarity

This is the standard method to use when comparing entities with multiple attributes. This method will calculate all x all feature attributes, and then generate an aggregate score for the entity pair. This is done using a "sub-similarity" method. For all best-matching attributes (in both directions) an additional "deep similarity" check is performed. Calculating this may be more computationally expensive than the method used to do the all by all comparison. The final score is the average of all best-matching attributes by the sub-similarity method. TODO: also provide average of all best-matching by deep-sim method This method is configurable. By default, AsymmetricJaccardSimilarity is used to calculate all x all attributes for the entity pair. ConjunctiveSetInformationContentRatioSimilarity is used for the "deep simularity" check - i.e. by default all the best matching attributes scored by AsymmetricJaccardSimilarity will be compared by ConjunctiveSetInformationContentRatioSimilarity. The average of all ConjunctiveSetInformationContentRatioSimilarity scores for all best matches is similar to avgICCS in Washington et al. The difference is that ConjunctiveSetInformationContentRatioSimilarity can include dynamic LCSs. This method can also be used to generate the maxIC - simply take the maximum of the IC of all reported ConjunctiveSetInformationContentRatioSimilarity values

Author:
cjm

Field Summary
 double aScore
           
 double bScore
           
 String[] deepSimMethods
           
 Map<org.semanticweb.owlapi.model.OWLObject,Set<org.semanticweb.owlapi.model.OWLObject>> featureToAttributeMap
           
 String preSimMethod
           
 String subSimMethod
           
 
Fields inherited from class owltools.sim.Similarity
minScore
 
Constructor Summary
MultiSimilarity()
           
 
Method Summary
 void calculate(SimEngine simEngine, org.semanticweb.owlapi.model.OWLObject a, org.semanticweb.owlapi.model.OWLObject b)
           
 String getPreSimMethod()
           
 String getSubSimMethod()
           
 void print(PrintStream s)
           
 void report(Reporter r)
           
 void setPreSimMethod(String preSimMethod)
           
 void setSubSimMethod(String subSimMethod)
           
 Set<org.semanticweb.owlapi.model.OWLObject> sortMapByScore(Map<org.semanticweb.owlapi.model.OWLObject,Similarity> map)
           
protected  void translateResultsToOWLAxioms(String id, org.semanticweb.owlapi.model.OWLNamedIndividual result, Set<org.semanticweb.owlapi.model.OWLAxiom> axioms)
          adds additional axioms specific to this method.
 
Methods inherited from class owltools.sim.Similarity
addResultsToOWLOntology, annotationIRI, createOWLOntologyFromResults, getScore, isAboveMinScore, print, print, printDescription, printDescription, setScore, setScore, splitIRI, toString, translateResultsToOWLAxioms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

deepSimMethods

public String[] deepSimMethods

subSimMethod

public String subSimMethod

preSimMethod

public String preSimMethod

aScore

public double aScore

bScore

public double bScore

featureToAttributeMap

public Map<org.semanticweb.owlapi.model.OWLObject,Set<org.semanticweb.owlapi.model.OWLObject>> featureToAttributeMap
Constructor Detail

MultiSimilarity

public MultiSimilarity()
Method Detail

getSubSimMethod

public String getSubSimMethod()

setSubSimMethod

public void setSubSimMethod(String subSimMethod)

getPreSimMethod

public String getPreSimMethod()

setPreSimMethod

public void setPreSimMethod(String preSimMethod)

calculate

public void calculate(SimEngine simEngine,
                      org.semanticweb.owlapi.model.OWLObject a,
                      org.semanticweb.owlapi.model.OWLObject b)
               throws SimEngine.SimilarityAlgorithmException
Specified by:
calculate in class Similarity
Throws:
SimEngine.SimilarityAlgorithmException

sortMapByScore

public Set<org.semanticweb.owlapi.model.OWLObject> sortMapByScore(Map<org.semanticweb.owlapi.model.OWLObject,Similarity> map)

report

public void report(Reporter r)
Overrides:
report in class Similarity

print

public void print(PrintStream s)
Overrides:
print in class Similarity

translateResultsToOWLAxioms

protected void translateResultsToOWLAxioms(String id,
                                           org.semanticweb.owlapi.model.OWLNamedIndividual result,
                                           Set<org.semanticweb.owlapi.model.OWLAxiom> axioms)
adds additional axioms specific to this method. Creates a named LCS class equivalent to the generated expression

Specified by:
translateResultsToOWLAxioms in class Similarity
Parameters:
id -
result -
axioms -


Copyright © 2010-2012. All Rights Reserved.