Distance matrix based on specified distance measure
Parameters
Name
Type
Description
Default
arr
numpy.numpy.ndarray
A design matrix
required
metric
str
Specifiy the following distance measure: ‘euclidean’: Usual distance between the two vectors (L_2 norm) ‘maximum’: Maximum distance between two components of x and y (supremum norm) ‘manhattan’: Absolute distance between the two vectors (L_1 norm) ‘minkowski’: The p norm, the pth root of the sum of the pth powers of the differences of the components
'euclidean'
p
int
The power of the Minkowski distance. Defaults to 2.
2
Returns
Type
Description
numpy.numpy.ndarray
The calculated distance matrix baed on specified distance measure