kmeans-postgresql icon indicating copy to clipboard operation
kmeans-postgresql copied to clipboard

Getting never more than 3 clusters, unless manual initial points were given.

Open jonathanslenders opened this issue 13 years ago • 1 comments

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?

jonathanslenders avatar Dec 29 '11 15:12 jonathanslenders

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.

umitanuki avatar Jan 04 '12 01:01 umitanuki