Algorithm 1. SNN index.
| 1: Input: Data matrix |
| 2: Compute |
| 3: Compute the mean-centered matrix X with rows |
| 4: Compute the singular value decomposition of |
| 5: Compute the sorting keys for |
| 6: Sort data points X such that |
| 7: Compute for |
| 8: Return: μ, X, v1, , |