Learn R Programming

semisupKernelPCA (version 0.1.5)

computeKernel: computeKernel

Description

Compute a kernel matrix from a data set.

Usage

computeKernel(data, type=c("gaussian", "pgaussian"))

Arguments

data
n x d matrix of d-dimensional row-elements.
type
if "pgaussian", use the p-gaussian kernel function (see Francois et al. 2005). If "gaussian", use the classic gaussian kernel, ie p-gaussian function with p=2 and sigma set to the maximal pairwise distance between elements of the data set.

Value

  • n x n kernel matrix.

References

Andrew Y. Ng, Michael I. Jordan, Yair Weiss On Spectral Clustering: Analysis and an Algorithm Neural Information Processing Symposium 2001 http://www.nips.cc/NIPS2001/papers/psgz/AA35.ps.gz Francois, D., Wertz, V. and Verleysen, M. About the locality of kernels in high-dimensional spaces International Symposium on Applied Stochastic Models and Data Analysis 2005, pp 238-245.

See Also

computeProjectionFromKernel

Examples

Run this code
data(iris)
irisdat <- as.matrix(iris[,1:4])
kernel <- computeKernel(irisdat, "pgaussian")

Run the code above in your browser using DataLab