Transformer (Pairwise Panel)
DistFromKernel
Distance function obtained from a kernel function.
Formal details (for real valued objects, mixed typed rows in analogy): Let \(k: \mathbb{R}^D \times \mathbb{R}^D\rightarrow \mathbb{R}\) be the pairwise function in kernel, when applied to D-vectors. DistFromKernel(dist) corresponds to the distance function \(d(x, y):= \sqrt{k(x, x) + k(y, y) - 2 \cdot k(x, y)}\).
It should be noted that if \(k\) is positive semi-definite, then \(d\) will be a metric and satisfy the triangle inequality.
Quickstart
python
from sktime.dists_kernels.dist_to_kern import DistFromKernel
estimator = DistFromKernel(kernel)Parameters(1)
- kernelpairwise transformer of BasePairwiseTransformer scitype, or
- callable np.ndarray (n_samples, nd) x (n_samples, nd) -> (n_samples x n_samples)