Expand description
Kernel functions matching the original LIBSVM.
Provides both:
- Standalone
k_functionfor prediction (operates on sparse node slices) Kernelstruct for training (precomputes x_square for RBF, stores refs)
Structs§
- Kernel
- Kernel evaluator for training. Holds references to the dataset and
precomputes
x_square[i] = dot(x[i], x[i])for RBF kernels.
Functions§
- dot
- Sparse dot product of two sorted-by-index node slices.
- k_
function - Evaluate the kernel function K(x, y) for the given parameters.
- powi
- Integer power by squaring. Matches LIBSVM’s
powi(base, times).