We run offline clustering(such as kmeans) only on real centers and set the belonging id(start from 0) to every center before sinking. However, when we start sinking the outlier centers, we forget setting the id but just set outlier(bool) true.
For KMeans, when k <2, error occurs.
For evaluation, it is required that the clustering id we set before start from 0, but we set the id of outlier center -1 in groupByCentersWithOffline function and forget setting id for outlier centers in groupByCenters function.
So I include both real and outlier centers for running offline clustering(such as kmeans), and thus it is no longer required to additionally set id for outlier centers. They all start from 0. Besides, after this change, the old groupByCenters can be erased and we can use the same function to group the result centers no matter with or withour offline clusteirng.
Three problems:
So I include both real and outlier centers for running offline clustering(such as kmeans), and thus it is no longer required to additionally set id for outlier centers. They all start from 0. Besides, after this change, the old groupByCenters can be erased and we can use the same function to group the result centers no matter with or withour offline clusteirng.