public class Sim_pairwise_DAG_node_Lin_1998 extends Object implements Sim_DAG_node_abstract
SYMMETRIC = YES
VALUE : [0,1]
Reference: Lin, Dekang. (1998). An Information-Theoretic Definition of Similarity. In 15th International Conference of Machine Learning (pp. 296–304). Madison,WI.
Considering a function IC which is used to assess the information content of
a concept, with IC(u) the information content of the concept u, this measure
relies on a ratio between the IC of the Most Specific Common Ancestor of the
compared concepts and the sum of their IC. The MICA is therefore the common
ancestor of the compared concepts which maximizes the selected IC function.
If multiple MICAs are found only one will be considered.
The measure is therefore defined by:
sim(u,v) = 2 x IC(MICA(u,v)) / (IC(u) + IC(v))
Note that originally, the formulation proposed by Lin considered IC(u) =
log(p(u))
which is equivalent to considering the IC formulation
proposed by Resnik IC(u) = -log(p(u))
. However, in this
implementation any IC formulation can be used - the IC values must decrease
from the leaves to the root(s) of the taxonomy.
Modifier and Type | Field and Description |
---|---|
static boolean |
IS_SYMMETRIC |
Constructor and Description |
---|
Sim_pairwise_DAG_node_Lin_1998() |
Modifier and Type | Method and Description |
---|---|
boolean |
isSymmetric() |
void |
setPreventIncoherency(boolean preventIncoherency)
Setting this parameter you can decide if incoherences in the input
parameters must be detected (true) or not (false) - default true.
|
static double |
sim(double ic_a,
double ic_b,
double ic_mica)
Compute the similarity considering the given information content values.
|
double |
sim(org.openrdf.model.URI a,
org.openrdf.model.URI b,
SM_Engine c,
SMconf conf)
Compute the semantic similarity of the pair of concepts/classes.
|
public static final boolean IS_SYMMETRIC
public double sim(org.openrdf.model.URI a, org.openrdf.model.URI b, SM_Engine c, SMconf conf) throws slib.utils.ex.SLIB_Exception
Sim_Pairwise
sim
in interface Sim_Pairwise
a
- the first concept/classb
- the second concept/classc
- the engine used to access information required by the measuresconf
- the configuration to considerslib.utils.ex.SLIB_Exception
public static double sim(double ic_a, double ic_b, double ic_mica) throws slib.utils.ex.SLIB_Ex_Critic
ic_a
- the IC of the concept Aic_b
- the IC of the concept Bic_mica
- the IC of the Most Informative Common Ancestors of A and Bslib.utils.ex.SLIB_Ex_Critic
public void setPreventIncoherency(boolean preventIncoherency)
preventIncoherency
- true if incoherences must be detectedpublic boolean isSymmetric()
isSymmetric
in interface Sim_Pairwise
Copyright © 2014. All rights reserved.