See: Description
Interface | Description |
---|---|
DBIDDistanceFunction<D extends Distance<?>> |
Distance functions valid in a database context only (i.e. for DBIDs)
For any "distance" that cannot be computed for arbitrary objects, only those
that exist in the database and referenced by their ID.
|
DistanceFunction<O,D extends Distance<?>> |
Base interface for any kind of distances.
|
DoubleNorm<O> |
Interface for norms in the double domain.
|
FilteredLocalPCABasedDistanceFunction<O extends NumberVector<?>,P extends FilteredLocalPCAIndex<? super O>,D extends Distance<D>> |
Interface for local PCA based preprocessors.
|
FilteredLocalPCABasedDistanceFunction.Instance<T extends NumberVector<?>,I extends Index,D extends Distance<D>> |
Instance produced by the distance function.
|
IndexBasedDistanceFunction<O,D extends Distance<D>> |
Distance function relying on an index (such as preprocessed neighborhoods).
|
IndexBasedDistanceFunction.Instance<T,I extends Index,D extends Distance<D>> |
Instance interface for Index based distance functions.
|
Norm<O,D extends Distance<D>> |
Abstract interface for a mathematical norm.
|
NumberVectorDistanceFunction<D extends Distance<D>> |
Base interface for the common case of distance functions defined on numerical vectors.
|
PrimitiveDistanceFunction<O,D extends Distance<?>> |
Primitive distance function that is defined on some kind of object.
|
PrimitiveDoubleDistanceFunction<O> |
Interface for distance functions that can provide a raw double value.
|
SpatialPrimitiveDistanceFunction<V extends SpatialComparable,D extends Distance<D>> |
API for a spatial primitive distance function.
|
SpatialPrimitiveDoubleDistanceFunction<V extends SpatialComparable> |
Interface combining spatial primitive distance functions with primitive
number distance functions.
|
Class | Description |
---|---|
AbstractDatabaseDistanceFunction<O,D extends Distance<D>> |
Abstract super class for distance functions needing a database context.
|
AbstractDatabaseDistanceFunction.Instance<O,D extends Distance<D>> |
The actual instance bound to a particular database.
|
AbstractDBIDDistanceFunction<D extends Distance<D>> |
AbstractDistanceFunction provides some methods valid for any extending class.
|
AbstractIndexBasedDistanceFunction<O,I extends Index,D extends Distance<D>> |
Abstract super class for distance functions needing a database index.
|
AbstractIndexBasedDistanceFunction.Instance<O,I extends Index,D extends Distance<D>,F extends DistanceFunction<? super O,D>> |
The actual instance bound to a particular database.
|
AbstractIndexBasedDistanceFunction.Parameterizer<F extends IndexFactory<?,?>> |
Parameterization class.
|
AbstractPrimitiveDistanceFunction<O,D extends Distance<D>> |
AbstractDistanceFunction provides some methods valid for any extending class.
|
AbstractSpatialDoubleDistanceFunction |
Abstract base class for typical distance functions that allow
rectangle-to-rectangle lower bounds.
|
AbstractSpatialDoubleDistanceNorm |
Abstract base class for typical distance functions that allow
rectangle-to-rectangle lower bounds.
|
AbstractVectorDoubleDistanceFunction |
Abstract base class for the most common family of distance functions: defined
on number vectors and returning double values.
|
AbstractVectorDoubleDistanceNorm |
Abstract base class for double-valued number-vector-based distances based on
norms.
|
ArcCosineDistanceFunction |
Cosine distance function for feature vectors.
|
ArcCosineDistanceFunction.Parameterizer |
Parameterization class.
|
BrayCurtisDistanceFunction |
Bray-Curtis distance function / Sørensen–Dice coefficient for continuous
spaces.
|
BrayCurtisDistanceFunction.Parameterizer |
Parameterization class.
|
CanberraDistanceFunction |
Canberra distance function, a variation of Manhattan distance.
|
CanberraDistanceFunction.Parameterizer |
Parameterization class.
|
ClarkDistanceFunction |
Clark distance function for vector spaces.
|
ClarkDistanceFunction.Parameterizer |
Parameterization class.
|
CosineDistanceFunction |
Cosine distance function for feature vectors.
|
CosineDistanceFunction.Parameterizer |
Parameterization class.
|
Kulczynski1DistanceFunction |
Kulczynski similarity 1, in distance form.
|
Kulczynski1DistanceFunction.Parameterizer |
Parameterization class.
|
LocallyWeightedDistanceFunction<V extends NumberVector<?>> |
Provides a locally weighted distance function.
|
LocallyWeightedDistanceFunction.Instance<V extends NumberVector<?>> |
Instance of this distance for a particular database.
|
LocallyWeightedDistanceFunction.Parameterizer<V extends NumberVector<?>> |
Parameterization class.
|
LorentzianDistanceFunction |
Lorentzian distance function for vector spaces.
|
LorentzianDistanceFunction.Parameterizer |
Parameterization class.
|
MinKDistance<O,D extends Distance<D>> |
A distance that is at least the distance to the kth nearest neighbor.
|
MinKDistance.Parameterizer<O,D extends Distance<D>> |
Parameterization class.
|
ProxyDistanceFunction<O,D extends Distance<D>> |
Distance function to proxy computations to another distance (that probably
was run before).
|
RandomStableDistanceFunction |
This is a dummy distance providing random values (obviously not metrical),
useful mostly for unit tests and baseline evaluations: obviously this
distance provides no benefit whatsoever.
|
RandomStableDistanceFunction.Parameterizer |
Parameterization class.
|
SharedNearestNeighborJaccardDistanceFunction<O> |
SharedNearestNeighborJaccardDistanceFunction computes the Jaccard
coefficient, which is a proper distance metric.
|
SharedNearestNeighborJaccardDistanceFunction.Instance<T> |
Actual instance for a dataset.
|
SharedNearestNeighborJaccardDistanceFunction.Parameterizer<O> |
Parameterization class.
|
WeightedCanberraDistanceFunction |
Weighted Canberra distance function, a variation of Manhattan distance.
|
WeightedDistanceFunction |
Provides the Weighted distance for feature vectors.
|
Distance functions for use within ELKI.
There are three basic types of distance functions:
Primitive Distance Function
s that can be computed for any two objects.DBID Distance Function
s, that are only defined for object IDs, e.g. an external distance matrixIndex-Based Distance Function
s, that require an indexing/preprocessing step, and are then valid for existing database objects.As a 'consumer' of distances, you usually do not care about the type of distance function you
want to use. To facilitate this, a distance function can be bound to a database by calling
the 'instantiate' method to obtain a DistanceQuery
object.
A distance query is a best-effort adapter for the given distance function. Usually, you pass it
two DBIDs and get the distance value back. When required, the adapter will get the appropriate
records from the database needed to compute the distance.
Note: instantiating a preprocessor based distance will invoke the preprocessing step. It is recommended to do this as soon as possible, and only instantiate the query once, then pass the query object through the various methods.
DistanceQuery<V, DoubleDistance> distanceQuery = database.getDistanceQuery(EuclideanDistanceFunction.STATIC);