Skip to content

Instantly share code, notes, and snippets.

@drauschenbach
Created February 24, 2019 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drauschenbach/339581f50d921a4415226f71345e4549 to your computer and use it in GitHub Desktop.
Save drauschenbach/339581f50d921a4415226f71345e4549 to your computer and use it in GitHub Desktop.
$ redis-cli --eval train-kmeans-with-dependencies.lua 0,0
$ tail /usr/local/var/log/redis.log
22385:M 23 Feb 2019 12:48:23.898 - Accepted 127.0.0.1:49901
INFO Running Stuart (Embedded Spark 2.2.0)
INFO Local KMeans++ reached the max number of iterations: 30
INFO Local KMeans++ reached the max number of iterations: 30
INFO KMeans converged in 4 iterations.
INFO The cost is 320.460000
Model: KMeansModel(clusterCenters=1,2)
center 1 (3.0333333333333,0.033333333333333)
center 2 (4.55,0.05)
Predicts:
point (0,0) ==> center 1 (3.0333333333333,0.033333333333333)
point (0,0.1) ==> center 1 (3.0333333333333,0.033333333333333)
point (0.1,0) ==> center 1 (3.0333333333333,0.033333333333333)
point (9,0) ==> center 2 (4.55,0.05)
point (9,0.2) ==> center 2 (4.55,0.05)
point (9.2,0) ==> center 2 (4.55,0.05)
22385:M 23 Feb 2019 12:48:23.913 - Client closed connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment