Ordering
Index
SparseKoLesky.Ordering
SparseKoLesky.Ordering.KernelDist
SparseKoLesky.Ordering.KernelDist
SparseKoLesky.maximin_ordering
SparseKoLesky.Ordering
— ModuleOrdering
Implements the maximin ordering and other geometric algorithms.
SparseKoLesky.Ordering.KernelDist
— TypeKernelDist{K<:Kernel} <: Metric
Correlation distance based on a kernel function for covariances.
This implements the Distances.jl Metric
interface.
Arguments
kernel::K
: base kernel function. This should be a KernelFunctions.jlKernel
.
SparseKoLesky.Ordering.KernelDist
— Method(k::KernelDist)(p, q)
Distance between points p
and q
using the KernelDist
metric.
The correlation distance for a kernel function $k(\cdot, \cdot)$ is defined as
\[\mathsf{dist}(p, q) \coloneqq \sqrt{1 - \left \lvert \rho \right \rvert}\]
where the correlation coefficient $\rho$ is defined as
\[\rho(p, q) \coloneqq \frac{k(p, q)}{\sqrt{k(p, p) k(q, q)}}.\]
SparseKoLesky.maximin_ordering
— Methodmaximin_ordering(
kernel::Kernel,
x::AbstractMatrix,
k_neighbors=1;
init_distances=fill(typemax(eltype(x)), (k_neighbors, size(x, 2))),
Tree=BallTree,
)
Maximin ordering of x
using k_neighbors
for robustness.
The current implementation is directly copied from the maximin_ordering
of KoLesky.jl.