neighbors
Gaussian kernel density estimation over packed batches.
Functions:
-
gaussian_kernel_density–Computes the Gaussian Kernel Density (KDE) for a given tensor.
gaussian_kernel_density
¶
Computes the Gaussian Kernel Density (KDE) for a given tensor.
Parameters:
-
x(Tensor) –The input tensor of shape \((N, C)\).
-
batch(Tensor) –The batch tensor of shape \((N,)\).
-
bandwidth(float) –The bandwidth of the Gaussian kernel.
Returns:
-
Tensor–The Gaussian Kernel Density of shape \((N,)\).