net.sourceforge.nite.datainspection.impl
Class DiceMetricsForStringTwoSetValues
java.lang.Object
net.sourceforge.nite.datainspection.impl.DiceMetricsForStringTwoSetValues
- All Implemented Interfaces:
- DistanceMetric
public class DiceMetricsForStringTwoSetValues
- extends java.lang.Object
- implements DistanceMetric
class DiceMetricsForStringTwoSetValues for distance metrics for alpha
distance(v1,v2) = 1.0 if (v1.datype != v2.datype)
distance(v1,v2) = lambda * distance(v1.aset,v2.aset) + (1-lambda)*distance(v1.bset,v2.bset)
user can set the lambda value but it should be in [0,1]
Method Summary |
double |
distance(Value f,
Value s)
Implements distance of interface DistanceMetric
distance(v1,v2) = 1.0 if (v1.datype != v2.datype)
distance(v1,v2) = lambda * distance(v1.aset,v2.aset) + (1-lambda)*distance(v1.bset,v2.bset)
User can set the lambda value but it should be in [0,1]
using Dice coefficient on two given sets |
double |
lambda()
|
void |
setLambda(double lambda)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lambda
public double lambda
DiceMetricsForStringTwoSetValues
public DiceMetricsForStringTwoSetValues()
setLambda
public void setLambda(double lambda)
- Parameters:
lambda
- weighting factor for the distances between the a-sets and the b-sets part of the
StringTwoSets values used in computing the distance between two of these type of Values
lambda
public double lambda()
- Returns:
- lambda
distance
public double distance(Value f,
Value s)
- Implements distance of interface DistanceMetric
distance(v1,v2) = 1.0 if (v1.datype != v2.datype)
distance(v1,v2) = lambda * distance(v1.aset,v2.aset) + (1-lambda)*distance(v1.bset,v2.bset)
User can set the lambda value but it should be in [0,1]
using Dice coefficient on two given sets
- Specified by:
distance
in interface DistanceMetric
- Parameters:
f
- and s must be StringTwoSetValues
- Returns:
- distance(f,s) as defined above