computeGaussianSimilarityZP | R Documentation |
Compute a similarity matrix thanks a Gaussian kernel for which the parameters are self-tuned (according to Zelnik-Manor and Perona, 2004).
computeGaussianSimilarityZP(dat, k = 7)
dat |
numeric matrix of data (point by line). |
k |
number of neighbour for the computation of local sigma (smooth parameter of Gaussian kernel). |
computeGaussianSimilarityZP returns a similarity matrix computed thanks a Gaussian kernel for which the parameters are self-tuned (according to Zelnik-Manor and Perona, 2004)
sim similarity matrix.
L. Zelnik-Manor, P. Perona, Self tuning spectral clustering, Adv. Neural Inf. Process. Systems (2004), pp. 1601-1608.
computeGaussianSimilarity
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 <- computeGaussianSimilarityZP(dat, 10)
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.