KMeans clustering and weighted centroid analysis

This commit is contained in:
Ubuntu
2016-06-07 19:58:32 +00:00
parent 21dd956c15
commit 4e86965f03
8 changed files with 166 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
\pset format unaligned
\set ECHO all
SELECT count(DISTINCT cluster_no) as clusters from cdb_crankshaft.cdb_kmeans('select * from ppoints', 2);
SELECT count(*) clusters from cdb_crankshaft.cdb_WeightedMean( 'select *, code::INTEGER as cluster from ppoints' , 'value', 'cluster' );