unsup
unsup copied to clipboard
Pb with kmean if dim=1
According to this line, https://github.com/koraykv/unsup/blob/master/kmeans.lua#L39L42 because we divide each centroids by its norm, in the case of a number of dimension equal to 1, the centroids will all be initialized to the same value: 1 (or -1). In my case, that gave strange results where only 2 of the 8 centroids where used in the final results. Initializing the centroid to random points of the given data x worked much better in my case.