kmeans-postgresql
kmeans-postgresql copied to clipboard
Getting never more than 3 clusters, unless manual initial points were given.
Somehow, we get never more than 3 clusters. Except for a few points, all of them fall into a single cluster.
We are using postgis, using the following query:
SELECT id, kmeans(ARRAY[ ST_X(point), ST_Y(point)], 40) OVER () AS k, id, FROM our_table ORDER BY k DESC;
Is there any way to improve the initial choosen points?
Sorry for the delay. Picking up initial points automatically is a hard problem, but I thought I did something reasonable... Could you provide reproducible dataset? I think I could add more various methods for the initial points like kmeans++ if there are needs.