bundles / scipy 1.17.1 / scipy / spatial / distance / sokalsneath
function
scipy.spatial.distance:sokalsneath
source: /scipy/spatial/distance.py :1515
Signature
def sokalsneath ( u , v , w = None ) Summary
Compute the Sokal-Sneath dissimilarity between two boolean 1-D arrays.
Extended Summary
The Sokal-Sneath dissimilarity between u and v,
where is the number of occurrences of and for and .
Parameters
u: (N,) array_like, boolInput array.
v: (N,) array_like, boolInput array.
w: (N,) array_like, optionalThe weights for each value in
uandv. Default is None, which gives each value a weight of 1.0
Returns
sokalsneath: doubleThe Sokal-Sneath dissimilarity between vectors
uandv.
Examples
from scipy.spatial import distance
✓distance.sokalsneath([1, 0, 0], [0, 1, 0]) distance.sokalsneath([1, 0, 0], [1, 1, 0]) distance.sokalsneath([1, 0, 0], [2, 1, 0]) distance.sokalsneath([1, 0, 0], [3, 1, 0])✗
Aliases
-
scipy.spatial.distance.sokalsneath