diff --git a/doc/11_kmeans.md b/doc/11_kmeans.md index 93926cf..4a21faa 100644 --- a/doc/11_kmeans.md +++ b/doc/11_kmeans.md @@ -80,7 +80,7 @@ As a standard machine learning method, k-means clustering is an unsupervised lea | query | TEXT | SQL query to expose the data to be used in the analysis (e.g., `SELECT * FROM iris_data`). It should contain at least the columns specified in `colnames` and the `id_colname`. | | colnames | TEXT[] | Array of columns to be used in the analysis (e.g., `Array['petal_width', 'sepal_length', 'petal_length']`). | | no\_clusters | INTEGER | Number of clusters for the classification of the data | -| id_colname (optaional) | TEXT | The id column (default: 'cartodb_id') for identifying rows | +| id_col (optional) | TEXT | The id column (default: 'cartodb_id') for identifying rows | | standarize (optional) | BOOLEAN | Setting this to true (default) standardizes the data to have a mean at zero and a standard deviation of 1 | ### Returns diff --git a/src/pg/sql/11_kmeans.sql b/src/pg/sql/11_kmeans.sql index 89e16a8..7aad2d8 100644 --- a/src/pg/sql/11_kmeans.sql +++ b/src/pg/sql/11_kmeans.sql @@ -21,7 +21,7 @@ CREATE OR REPLACE FUNCTION CDB_KMeansNonspatial( colnames TEXT[], num_clusters INTEGER, standardize BOOLEAN DEFAULT true, - id_colname TEXT DEFAULT 'cartodb_id' + id_col TEXT DEFAULT 'cartodb_id' ) RETURNS TABLE(cluster_label text, cluster_center json, silhouettes numeric, rowid bigint) AS $$ @@ -29,7 +29,7 @@ RETURNS TABLE(cluster_label text, cluster_center json, silhouettes numeric, rowi kmeans = Kmeans() return kmeans.nonspatial(query, colnames, num_clusters, standardize=standardize, - id_col=id_colname) + id_col=id_col) $$ LANGUAGE plpythonu;