Expand description
Distances between observations, following scipy.spatial.distance: the standard metrics, the
condensed pairwise distances of one set (pdist), the distances between two sets (cdist),
and conversion between condensed and square forms (squareform).
See the book entry More descriptive statistics and robust regression.
Enums§
- Metric
- A distance between two vectors
uandv.
Functions§
- cdist
- The
ma × mbmatrix of distances between two sets of observations (SciPy’scdist). - distance
- The distance between
uandvundermetric(SciPy’s functions inspatial.distance). - pdist
- The condensed distance matrix of
mobservations (SciPy’spdist): them(m − 1)/2distancesd(i, j)fori < j, in row order. - squareform
- Expands a condensed distance vector into the symmetric square matrix with a zero diagonal
(SciPy’s
squareform). Its length must bem(m − 1)/2for somem. - squareform_
to_ condensed - The condensed form of a square distance matrix (SciPy’s
squareformin the other direction): its entries above the diagonal, in row order. The matrix must be square and symmetric with a zero diagonal.