Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I'm using scikit-learn's SpectralClustering class, which has the option of building its affinity matrix using a K-Nearest Neighbors algorithm. Is there any way to calculate an "optimal" value of K?