Opened 7 years ago
Last modified 7 years ago
#3965 closed defect
KMeans provides less than K clusters — at Initial Version
Reported by: | komzpa | Owned by: | pramsey |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.4.3 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
Clustering 100 distinct points into 100 clusters gets 96 clusters:
select count(distinct cid) from (WITH points AS ( SELECT ST_MakePoint(x,y) geom from generate_series(1,5) x, generate_series(1,5) y ) SELECT ST_ClusterKMeans(geom, 25) over () AS cid, geom FROM points) z;
The larger K is, the bigger losses are.
Note:
See TracTickets
for help on using tickets.