@Reference(authors="J. R. Bray, J. T. Curtis",title="An ordination of the upland forest communities of southern Wisconsin",booktitle="Ecological monographs 27.4",url="https://doi.org/10.2307/1942268",bibkey="doi:10.2307/1942268") @Reference(authors="T. S\u00f8rensen",title="A method of establishing groups of equal amplitude in plant sociology based on similarity of species and its application to analyses of the vegetation on Danish commons",booktitle="Kongelige Danske Videnskabernes Selskab 5 (4)",bibkey="journals/misc/Sorensen48") @Reference(authors="L. R. Dice",title="Measures of the Amount of Ecologic Association Between Species",booktitle="Ecology 26 (3)",url="https://doi.org/10.2307/1932409",bibkey="doi:10.2307/1932409") @Alias(value={"bray-curtis","braycurtis","sorensen","dice","sorensen-dice"}) public class BrayCurtisDistanceFunction extends AbstractNumberVectorDistanceFunction implements SpatialPrimitiveDistanceFunction<NumberVector>
Reference:
J. R. Bray, J. T. Curtis
An ordination of the upland forest communities of southern Wisconsin
Ecological monographs 27.4
Also:
T. Sørensen
A method of establishing groups of equal amplitude in plant sociology based
on similarity of species and its application to analyses of the vegetation on
Danish commons
Kongelige Danske Videnskabernes Selskab 5 (4)
and:
L. R. Dice
Measures of the Amount of Ecologic Association Between Species
Ecology 26 (3)
Note: we modified the usual definition of Bray-Curtis for use with negative values. In essence, this function is defined as:
ManhattanDistance(v1, v2) / (ManhattanNorm(v1) + ManhattanNorm(v2))
This obviously limits the usefulness of this distance function for cases where this kind of normalization is desired. In particular in low dimensional data it should be used with care.
TODO: add a version optimized for sparse vectors / binary data.
Modifier and Type | Class and Description |
---|---|
static class |
BrayCurtisDistanceFunction.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
static BrayCurtisDistanceFunction |
STATIC_CONTINUOUS
Static instance.
|
Constructor and Description |
---|
BrayCurtisDistanceFunction()
Deprecated.
Use
STATIC_CONTINUOUS instance instead. |
Modifier and Type | Method and Description |
---|---|
double |
distance(NumberVector v1,
NumberVector v2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
double |
minDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this distance
function.
|
dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, getInputTypeRestriction
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
instantiate
getInputTypeRestriction
isMetric, isSquared, isSymmetric
public static final BrayCurtisDistanceFunction STATIC_CONTINUOUS
@Deprecated public BrayCurtisDistanceFunction()
STATIC_CONTINUOUS
instance instead.public double distance(NumberVector v1, NumberVector v2)
PrimitiveDistanceFunction
distance
in interface NumberVectorDistanceFunction<NumberVector>
distance
in interface PrimitiveDistanceFunction<NumberVector>
v1
- first DatabaseObjectv2
- second DatabaseObjectpublic double minDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDistanceFunction
minDist
in interface SpatialPrimitiveDistanceFunction<NumberVector>
mbr1
- the first MBR objectmbr2
- the second MBR objectpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.