owltools.sim
Class MultiSimilarity
java.lang.Object
owltools.sim.Similarity
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
Methods inherited from class owltools.sim.Similarity |
addResultsToOWLOntology, annotationIRI, createOWLOntologyFromResults, getScore, isAboveMinScore, print, print, printDescription, printDescription, setScore, setScore, splitIRI, toString, translateResultsToOWLAxioms |
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
MultiSimilarity
public MultiSimilarity()
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.