Skip to content

Instantly share code, notes, and snippets.

@flockonus
Created August 1, 2013 21:03
Show Gist options
  • Select an option

  • Save flockonus/6135297 to your computer and use it in GitHub Desktop.

Select an option

Save flockonus/6135297 to your computer and use it in GitHub Desktop.
simple math cluster
// https://npmjs.org/package/smeans
// create 4 clusters, why? (?)
var data = []; for(var i = 0; i < 10000; i++){ data.push(i*Math.random()) }; clusters = Object.keys( require('smeans').cluster( data ) ).length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment