Compute and return the similarity matrix of a data frame using gaussian kernel with a local scale parameter for each data point,
rather than a unique scale parameter.
Usage
ZPGaussianSimilarity(data, K)
Arguments
data
a matrix or numeric data frame.
K
number of neighbours considered to compute scale parameters.
Value
The matrix of similarity.
References
Zelnik-Manor, Lihi, and Pietro Perona. "Self-tuning spectral clustering." Advances in neural information processing systems. 2004.
Examples
x <- rbind(matrix(rnorm(50, mean = 0, sd = 0.3), ncol = 2))
similarity<-ZPGaussianSimilarity(x,7)