computeGaussianSimilarityZP: Gaussian similarity

View source: R/codeSpectral.R

computeGaussianSimilarityZPR Documentation

Gaussian similarity

Description

Compute a similarity matrix thanks a Gaussian kernel for which the parameters are self-tuned (according to Zelnik-Manor and Perona, 2004).

Usage

computeGaussianSimilarityZP(dat, k = 7)

Arguments

dat

numeric matrix of data (point by line).

k

number of neighbour for the computation of local sigma (smooth parameter of Gaussian kernel).

Details

computeGaussianSimilarityZP returns a similarity matrix computed thanks a Gaussian kernel for which the parameters are self-tuned (according to Zelnik-Manor and Perona, 2004)

Value

sim similarity matrix.

References

L. Zelnik-Manor, P. Perona, Self tuning spectral clustering, Adv. Neural Inf. Process. Systems (2004), pp. 1601-1608.

See Also

computeGaussianSimilarity

Examples

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

RclusTool documentation built on May 29, 2024, 5:23 a.m.