kaknikhil commented on a change in pull request #441: Kmeans: simplified 
silhouette per point for k-means
URL: https://github.com/apache/madlib/pull/441#discussion_r325438121
 
 

 ##########
 File path: src/ports/postgres/modules/kmeans/kmeans.py_in
 ##########
 @@ -399,14 +403,18 @@ def compute_kmeans(schema_madlib, rel_args, rel_state, 
rel_source,
 def simple_silhouette_points(schema_madlib, rel_source, output_table, pid,
     expr_point, centroids, fn_dist, **kwargs):
 
+    """
+    Calculate the simple silhouette score for every data point.
+    """
+
     with MinWarning("error"):
         kmeans_validate_src(schema_madlib, rel_source)
         output_tbl_valid(output_table, 'kmeans')
 
         _assert(type(centroids) == list and
                 type(centroids[0]) == list and
                 len(centroids) > 1,
-                'kmeans: invalid centroids shape')
+                'kmeans: Invalid centroids shape. Centroids have be a 2D 
numeric array.')
 
 Review comment:
   /have be/have to be. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to