public class BinaryKernelDistance extends Object implements IDistanceFunction<BitSet>
KL(i,j) ) ([L^(N-dij)]*[(1 - L)^dij])^(k/N) where dij is the number of bits differing in fingerprint i and fingerprint j
Modifier and Type | Field and Description |
---|---|
protected double |
k |
protected double |
lambda |
Constructor and Description |
---|
BinaryKernelDistance() |
Modifier and Type | Method and Description |
---|---|
float |
getDistance(BitSet object1,
BitSet object2)
Distance should be large if objects are "far away" from each other, i.e.
|
double |
getK() |
double |
getLambda() |
float |
getNativeComparison(BitSet object1,
BitSet object2)
Calculates native comparison index between two objects (distance or similarity).
|
void |
setK(float k) |
void |
setLambda(double lambda) |
void |
setLambda(float lambda) |
String |
toString() |
public float getDistance(BitSet object1, BitSet object2) throws Exception
IDistanceFunction
getDistance
in interface IDistanceFunction<BitSet>
Exception
public float getNativeComparison(BitSet object1, BitSet object2) throws Exception
IDistanceFunction
IDistanceFunction.getDistance(Object, Object)
.getNativeComparison
in interface IDistanceFunction<BitSet>
Exception
public double getLambda()
public void setLambda(double lambda)
public double getK()
public void setK(float k)
public void setLambda(float lambda)
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.