This is an implementation of a semi-supervised/unsupervised clustering method called Iterative Label Spreading. The main algorithm is written in c, and wrapped in cython for use in python. The algorithm is presented in the following paper by Amanda J. Parker and Amanda S. Barnard.
First of all, thanks for the wonderful code. It runs smoothly without any error. However, after using your code I have trouble understanding the assignment of the input data point to the output clusters of the code. My motivation is to understand which input data points belong to which cluster. In particular, I do not understand the following which makes the assignment difficult:
I noticed that there is a variable example_ILS.ordering in your code that contains 2999 data point if I originally submit a matrix mit 3000 data points. Is this because the point with index 0 is the same as in the original (unsorted) dataset?
I also struggle to understand the variable "indices", which contains as many elements as clusters found. Initially, I thought that the numbers correspond to the starting point of the clusters (first index of the ordered datapoints for a given cluster). In my example, I obtain 6 values for indices: [816, 2154, 1783, 2280, 2642]. However, I thought the values should become larger from cluster to cluster, but it isn't. I think that I misunderstand something here and I would be very happy if you could tell me how to use this variable.