computeGaussianSimilarity: Gaussian similarity

Description Usage Arguments Details Value References See Also Examples

View source: R/codeSpectral.R

Description

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

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 Feb. 4, 2020, 5:08 p.m.