powered by
Kernel functions (see ?kernels) may be multiplied by constants, multiplied by each other, or added together.
?kernels
# S3 method for kernel *(x, k2)# S3 method for kernel +(k1, k2)
# S3 method for kernel +(k1, k2)
A new kernel function, with class c("kernel", "function").
c("kernel", "function")
a numeric or a kernel function
kernel
a kernel function
x = seq(-1, 1, 0.5) k = k_rbf() k2 = k_per(scale=0.2, period=0.3) k_add = k2 + 0.5*k print(k_add) image(k_add(x, x))
Run the code above in your browser using DataLab