Distance functions
ELKI release 0.4 includes the following distance functions
- EuclideanDistanceFunction
- ManhattanDistanceFunction
- LPNormDistanceFunction
- MaximumDistanceFunction
- MinimumDistanceFunction
- ArcCosineDistanceFunction
- CosineDistanceFunction
- SquaredEuclideanDistanceFunction
- LocallyWeightedDistanceFunction
- SharedNearestNeighborJaccardDistanceFunction
- RandomStableDistanceFunction
- Adapters for similarity functions:
- Color histogram distance functions:
- Correlation distance functions:
- Spatial distance functions (for geo data mining):
- External distance adapters (to access precomputed and externally computed distances):
- Subspace distance functions:
- Time series distance functions:
Similarity Functions
Similarity functions usable through the adapter classes above are:
Implementing custom distance funtions
When implementing custom distance functions, ask yourself the following questions first:
- Is it defined on the data itself (like euclidean distance) or on the instances (precomputed, external, second order distances)?
- What requirements does it have on the input data?
- What is the output data type?
Most likely, you will be implementing a PrimitiveDistanceFunction and can save yourself some work by deriving from AbstractVectorDoublePrimitiveDistanceFunction, for example (= input are arbitrary number vectors of equal dimensionality, the distance is defined on the data itself, and the output type are double values).