de.lmu.ifi.dbs.elki.distance.distancefunction.subspace
Class AbstractPreferenceVectorBasedCorrelationDistanceFunction.Instance<V extends NumberVector<?,?>,P extends PreferenceVectorIndex<V>>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDatabaseDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractIndexBasedDistanceFunction.Instance<V,P,PreferenceVectorBasedCorrelationDistance,AbstractPreferenceVectorBasedCorrelationDistanceFunction<? super V,?>>
de.lmu.ifi.dbs.elki.distance.distancefunction.subspace.AbstractPreferenceVectorBasedCorrelationDistanceFunction.Instance<V,P>
- All Implemented Interfaces:
- DatabaseQuery, DistanceQuery<V,PreferenceVectorBasedCorrelationDistance>, IndexBasedDistanceFunction.Instance<V,P,PreferenceVectorBasedCorrelationDistance>
- Direct Known Subclasses:
- DiSHDistanceFunction.Instance, HiSCDistanceFunction.Instance
- Enclosing class:
- AbstractPreferenceVectorBasedCorrelationDistanceFunction<V extends NumberVector<?,?>,P extends PreferenceVectorIndex<V>>
public abstract static class AbstractPreferenceVectorBasedCorrelationDistanceFunction.Instance<V extends NumberVector<?,?>,P extends PreferenceVectorIndex<V>>
- extends AbstractIndexBasedDistanceFunction.Instance<V,P,PreferenceVectorBasedCorrelationDistance,AbstractPreferenceVectorBasedCorrelationDistanceFunction<? super V,?>>
Instance to compute the distances on an actual database.
Field Summary |
(package private) double |
epsilon
The epsilon value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
epsilon
final double epsilon
- The epsilon value
AbstractPreferenceVectorBasedCorrelationDistanceFunction.Instance
public AbstractPreferenceVectorBasedCorrelationDistanceFunction.Instance(Relation<V> database,
P preprocessor,
double epsilon,
AbstractPreferenceVectorBasedCorrelationDistanceFunction<? super V,?> distanceFunction)
- Constructor.
- Parameters:
database
- Databasepreprocessor
- Preprocessorepsilon
- EpsilondistanceFunction
- parent distance function
distance
public PreferenceVectorBasedCorrelationDistance distance(DBID id1,
DBID id2)
- Description copied from class:
AbstractDistanceQuery
- Returns the distance between the two objects specified by their object ids.
- Specified by:
distance
in interface DistanceQuery<V extends NumberVector<?,?>,PreferenceVectorBasedCorrelationDistance>
- Specified by:
distance
in class AbstractDistanceQuery<V extends NumberVector<?,?>,PreferenceVectorBasedCorrelationDistance>
- Parameters:
id1
- first object idid2
- second object id
- Returns:
- the distance between the two objects specified by their object ids
correlationDistance
public abstract PreferenceVectorBasedCorrelationDistance correlationDistance(V v1,
V v2,
BitSet pv1,
BitSet pv2)
- Computes the correlation distance between the two specified vectors
according to the specified preference vectors.
- Parameters:
v1
- first vectorv2
- second vectorpv1
- the first preference vectorpv2
- the second preference vector
- Returns:
- the correlation distance between the two specified vectors
weightedDistance
public double weightedDistance(V v1,
V v2,
BitSet weightVector)
- Computes the weighted distance between the two specified vectors
according to the given preference vector.
- Parameters:
v1
- the first vectorv2
- the second vectorweightVector
- the preference vector
- Returns:
- the weighted distance between the two specified vectors according
to the given preference vector
weightedDistance
public double weightedDistance(DBID id1,
DBID id2,
BitSet weightVector)
- Computes the weighted distance between the two specified vectors
according to the given preference vector.
- Parameters:
id1
- the id of the first vectorid2
- the id of the second vectorweightVector
- the preference vector
- Returns:
- the weighted distance between the two specified vectors according
to the given preference vector
weightedPrefereneceVectorDistance
public double weightedPrefereneceVectorDistance(DBID id1,
DBID id2)
- Computes the weighted distance between the two specified data vectors
according to their preference vectors.
- Parameters:
id1
- the id of the first vectorid2
- the id of the second vector
- Returns:
- the weighted distance between the two specified vectors according
to the preference vector of the first data vector