2
$\begingroup$

I am doing a cluster analysis based on k-th-nearest-neighbor (KNN) method in SAS. The CLUSTER procedure requires to specify the $k$ (=number of neighbors to use for KNN density estimation) and I was wondering if there is a way or criteria to set the number of neighbors.

Based on the SAS manual,

k th-nearest-neighbor density linkage is strongly set consistent for high-density (density-contour) clusters if $k$ is chosen that $\frac{k}{n} \rightarrow 0$ and $\frac{k}{\ln(n)} \rightarrow \infty$ as $n \rightarrow \infty$.

Is this answer to my question? Any good papers on the application of this method will be helpful as well.

$\endgroup$
1
$\begingroup$

You can -- and, generally, should always -- do some cross-validation and try out a set of different values for k and see what looks best and produces the best results.

$\endgroup$
  • $\begingroup$ Thanks for your suggestion but cross-validation is what I've been trying and it can be tedious when there are so many different values to try... I want to know if there is a legitimate way to pick the number of $k$. $\endgroup$ – Ken Apr 23 '12 at 19:12
  • $\begingroup$ I don't know what to tell you. The optimal k parameter can vary greatly based on your data. Cross-validation or visual examination of the data is the "legitimate" way. $\endgroup$ – ktdrv Apr 26 '12 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.