Last chance! 50% off unlimited learning
Sale ends in
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.
ng_kernel(data, sigma = 0.1)
Data frame or matrix: with points as columns, features as rows
Numerical value: a global sigma that controls the drop off in affinity
A similarity matrix of the input data
Ng, Andrew Y., Michael I. Jordan, and Yair Weiss. "On spectral clustering: Analysis and an algorithm." Advances in neural information processing systems. 2002.
# NOT RUN {
ng_similarity <- ng_kernel(brain[[1]])
# }
Run the code above in your browser using DataLab