kernfun {KFPCA}R Documentation

Kernel Functions

Description

Some common-used kernel functions.

Usage

kernfun(type)

Arguments

type

A character denoting the kernel type; 'epan'(Epanechnikov), 'unif'(Uniform), 'quar'(Quartic), 'gauss'(Gaussian).

Value

The corresponding kernel function.

Examples

x <- seq(-2, 2, 0.01)
par(mfrow = c(2,2))
plot(x, kernfun("epan")(x), type = "l", main = "Epanechnikov")
plot(x, kernfun("unif")(x), type = "l", main = "Uniform")
plot(x, kernfun("quar")(x), type = "l", main = "Quartic")
plot(x, kernfun("gauss")(x), type = "l", main = "Gaussian")
par(mfrow = c(1,1))

[Package KFPCA version 2.0 Index]