Learn R Programming

Spectrum (version 1.1)

ng_kernel: ng_kernel: Kernel from the Ng spectral clustering algorithm

Description

This is the kernel from the Ng spectral clustering algorithm. It takes a global sigma which requires tuning for new datasets in most cases. It is possible to use the sigma_finder function to find a sigma for a dataset. Sigma is assumed to be squared already.

Usage

ng_kernel(data, sigma = 0.1)

Arguments

data

Data frame or matrix: with points as columns, features as rows

sigma

Numerical value: a global sigma that controls the drop off in affinity

Value

A similarity matrix of the input data

References

Ng, Andrew Y., Michael I. Jordan, and Yair Weiss. "On spectral clustering: Analysis and an algorithm." Advances in neural information processing systems. 2002.

Examples

Run this code
# NOT RUN {
ng_similarity <- ng_kernel(brain[[1]])
# }

Run the code above in your browser using DataLab