linear_kernel {NORMA}R Documentation

Kernels

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

linear_kernel(x, y, gamma = 0)

gaussian_kernel(x, y, gamma)

Arguments

x

numeric vector indicating value of x.

y

numeric vector indicating value of y.

gamma

gaussian kernel parameter \gamma.

Details

Linear kernel:

k(x,y) = x*y

Gaussian kernel:

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

Value

Returns a numeric representing the kernel value.

Author(s)

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

Examples

# 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)

[Package NORMA version 0.1 Index]