Kernel combination with linear interpolation
cmf_calc_combined_kernels(kernels, h, alpha_f, alphas)
kernels | |
---|---|
h | |
alpha_f | |
alphas |
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as cmf_calc_combined_kernels <- function(kernels, h, alpha_f, alphas) { mfields <- names(h) nfields <- length(mfields) for (f in 1:nfields) { alpha <- alpha_f[[mfields[f]]] if (f == 1) { Km <- h[[mfields[f]]] * cmf_kernels_interpolate(kernels[[mfields[f]]], alpha, alphas) } else { Km <- Km + h[[mfields[f]]] * cmf_kernels_interpolate(kernels[[mfields[f]]], alpha, alphas) } } return(Km) }