Skip to content

Kernel

Kernel(cvSpace, position, bandwidth, logWeight, numSamples=1, shape=GAUSSIAN)

A multivariate kernel with diagonal covariance.

evaluate

evaluate(points)

Log of the kernel at the given point or points.

Reflected at the domain walls when the space is bounded, by summing over the kernel's mirror images (see CVSpace.mirrorPositions) so this agrees with evaluateOnGrid. Unbounded spaces have no images, so this reduces to the single-term evaluation.

evaluateOnGrid

evaluateOnGrid()

Log of the kernel on the CV-space grid, in gridShape order.

findNearest

findNearest(centers, bandwidths, ignore=())

Index of and squared Mahalanobis distance to the nearest center.

merge

merge(other)

Absorb other, preserving total weight, mean and second moment.