linear_kernel: Kernels

Description Usage Arguments Details Value Author(s) Examples

Description

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.

Usage

1
2
3

Arguments

x

numeric vector indicating value of x.

y

numeric vector indicating value of y.

gamma

gaussian kernel parameter γ.

Details

Linear kernel:

k(x,y) = x*y

Gaussian kernel:

k(x,y) = exp(-γ||x-y||^2)

Value

Returns a numeric representing the kernel value.

Author(s)

Jesus Prada, jesus.prada@estudiante.uam.es

Examples

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)

NORMA documentation built on May 2, 2019, 11:11 a.m.

Related to linear_kernel in NORMA...