Description Usage Arguments Details Value Author(s) Examples
linear_kernel
computes the linear kernel between two given vector, x and y.
gaussian_kernel
computes the gaussian kernel between two given vectors, x and y.
1 2 3 | linear_kernel(x, y, gamma = 0)
gaussian_kernel(x, y, gamma)
|
x |
|
y |
|
gamma |
gaussian kernel parameter γ. |
Linear kernel:
k(x,y) = x*y
Gaussian kernel:
k(x,y) = exp(-γ||x-y||^2)
Returns a numeric
representing the kernel value.
Jesus Prada, jesus.prada@estudiante.uam.es
1 2 3 4 5 | # Linear kernel value between point x=c(1,2,3) and point y=c(2,3,4).
linear_kernel(c(1,2,3),c(2,3,4))
# Gaussian kernel value between point x=c(1,2,3) and point y=c(2,3,4) with gamma=0.1.
gaussian_kernel(c(1,2,3),c(2,3,4),0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.