net.sourceforge.nite.datainspection.impl
Class DiceMetricsForTwoSetValues
java.lang.Object
net.sourceforge.nite.datainspection.impl.DiceMetricsForTwoSetValues
- All Implemented Interfaces:
- DistanceMetric
public class DiceMetricsForTwoSetValues
- extends java.lang.Object
- implements DistanceMetric
class DiceMetricsTwoSetValues for distance metrics for alpha
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) = 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
DiceMetricsForTwoSetValues
public DiceMetricsForTwoSetValues()
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) = 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