computeGaussianSimilarity | R Documentation |
Compute a similarity matrix thanks a Gaussian kernel from a data matrix.
computeGaussianSimilarity(dat, sigma)
dat |
numeric matrix of data (point by line). |
sigma |
smooth parameter of Gaussian kernel. |
computeGaussianSimilarity returns a similarity matrix computed thanks a Gaussian kernel
sim similarity matrix.
U. Von Luxburg, A tutorial on spectral clustering, Statist. Comput., 17 (4) (2007), pp. 395-416
computeGaussianSimilarityZP
require(grDevices)
dat <- rbind(matrix(rnorm(100, mean = 0, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 4, sd = 0.3), ncol = 2))
sim <- computeGaussianSimilarity(dat, 1)
pal <- colorRampPalette(c("blue", "red"))
image(sim, col = pal(10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.