chemCast.weka
Class DiceSimilarity
java.lang.Object
EuclideanDistance
chemCast.weka.AbstractSimilarity
chemCast.weka.DiceSimilarity
public class DiceSimilarity
- extends AbstractSimilarity
Dice coefficient or Hodgkin-Richards Index.
Dice coefficient = 2*Sum(Xsj*Xtj)/[Sum(Xsj*Xsj)^2+Sum(Xtj*Xtj)^2]
or Hodgkin-Richards similarity index is Cab=2*Zab/(Zaa+Zbb).
This class calculates the dissimilarity 1-Cab.
See Todeschini,Consonni, "Handbook of Molecular Descriptors", p.399.
- Author:
- Nina Jeliazkova
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DiceSimilarity
public DiceSimilarity()
DiceSimilarity
public DiceSimilarity(Instances data)
getDistance
public float getDistance(Instance a,
Instance b)
throws java.lang.Exception
- Throws:
java.lang.Exception
getNativeComparison
public float getNativeComparison(Instance a,
Instance b)
throws java.lang.Exception
- Throws:
java.lang.Exception
distance
public double distance(Instance a,
Instance b)
throws java.lang.Exception
- Throws:
java.lang.Exception
distance
public double distance(Instance a,
Instance b,
double arg2)
distance
public double distance(Instance a,
Instance b,
double arg2,
boolean print)
postProcessDistances
public void postProcessDistances(double[] distances)
toString
public java.lang.String toString()