computeGaussianSimilarity: Gaussian similarity

View source: R/codeSpectral.R

computeGaussianSimilarityR Documentation

Gaussian similarity

Description

Compute a similarity matrix thanks a Gaussian kernel from a data matrix.

Usage

computeGaussianSimilarity(dat, sigma)

Arguments

dat

numeric matrix of data (point by line).

sigma

smooth parameter of Gaussian kernel.

Details

computeGaussianSimilarity returns a similarity matrix computed thanks a Gaussian kernel

Value

sim similarity matrix.

References

U. Von Luxburg, A tutorial on spectral clustering, Statist. Comput., 17 (4) (2007), pp. 395-416

See Also

computeGaussianSimilarityZP

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 <- computeGaussianSimilarity(dat, 1)

pal <- colorRampPalette(c("blue", "red"))
image(sim, col = pal(10))

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