heat.spatial
Import files in this folder into the heat.spatial namespace
Submodules
Package Contents
- cdist(X: heat.core.dndarray.DNDarray, Y: heat.core.dndarray.DNDarray = None, quadratic_expansion: bool = False) heat.core.dndarray.DNDarray
Calculate Euclidian distance between two DNDarrays:
\[d(x,y) = \sqrt{(|x-y|^2)}\]Returns 2D DNDarray of size :math: m times n
- manhattan(X: heat.core.dndarray.DNDarray, Y: heat.core.dndarray.DNDarray = None, expand: bool = False)
Calculate Manhattan distance between two DNDarrays:
\[d(x,y) = \sum{|x_i-y_i|}\]Returns 2D DNDarray of size :math: m times n
- rbf(X: heat.core.dndarray.DNDarray, Y: heat.core.dndarray.DNDarray = None, sigma: float = 1.0, quadratic_expansion: bool = False) heat.core.dndarray.DNDarray
Calculate Gaussian distance between two DNDarrays:
\[d(x,y) = exp(-(|x-y|^2/2\sigma^2)\]Returns 2D DNDarray of size :math: m times n