graphdot.microkernel.convolution module

graphdot.microkernel.convolution.Convolution(kernel: graphdot.microkernel._base.MicroKernel, mean=True)[source]

Creates a convolutional microkernel, which averages evaluations of a base microkernel between pairs of elements of two variable-length feature sequences.

Parameters:
  • kernel (MicroKernel) – The base kernel can be any elementary or composite microkernels, while the attribute to be convolved should be sequences.
  • mean (bool) – If True, return the arithmetic mean of the kernel evaluations, i.e. \(k_{conv}(X, Y) = \frac{\sum_{x \in X} \sum_{y \in Y} k_{base}(x, y)}{|X||Y|}\). Otherwise, return the sum of the kernel evaluations, i.e. \(k_{conv}(X, Y) = \sum_{x \in X} \sum_{y \in Y} k_{base}(x, y)\). Thus, this serves as a means of normalization beyonds the dot product based one.