pub fn kernel_classify_from_distances(
func_dists: &[f64],
y: &[usize],
scalar_covariates: Option<&FdMatrix>,
h_func: f64,
h_scalar: f64,
) -> Result<ClassifResult, FdarError>Expand description
Kernel classifier from a precomputed functional distance matrix.
Works with any distance matrix (elastic, DTW, Lp, or custom).
Bandwidth is selected via LOO-CV if h_func <= 0.
§Arguments
func_dists— Flat n × n functional distance matrix (row-major)y— Class labels (length n, 0-indexed)scalar_covariates— Optional scalar covariates (n × p), uses Euclidean distance internallyh_func— Functional bandwidth (0 = auto via LOO-CV)h_scalar— Scalar bandwidth (0 = auto)
§Errors
Returns errors if y.len() != n or fewer than 2 classes.