Sha256: 22f5f9365849a731dfbe41044bb293ec9bdab30a803ad632e8aac748bfaba21a

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

Kmeans Cluster
==============

**K-means clustering**


What is K-means?
----------------

See also.

+ http://en.wikipedia.org/wiki/K-means_clustering


Tutorial
--------

``` html
require 'kmeans/pair'
require 'kmeans/pearson'
require 'kmeans/cluster'

uniform_hash = {
"test01"=> {"hoge"=>0, "fuga"=>1, "piyo"=>0 },
"test02"=> {"hoge"=>2, "fuga"=>1, "piyo"=>3 },
"test03"=> {"hoge"=>3, "fuga"=>0, "piyo"=>1 },
"test04"=> {"hoge"=>0, "fuga"=>2, "piyo"=>0 },
"test05"=> {"hoge"=>4, "fuga"=>2, "piyo"=>3 },
"test06"=> {"hoge"=>3, "fuga"=>1, "piyo"=>1 }}

result = Kmeans::Cluster.new(uniform_hash, {
  :centroids => 5,
  :loop_max => 10
})
result.make_cluster

# The results differ for each run
p result.cluster.values #=> [["test01", "test04"], ["test02"], ["test03", "test05"], ["test06"], []]
```

For more info, see spec files.


ChangeLog
---------

See doc/ChangeLog.


Developers
----------

See doc/AUTHORS.


Author
------

**774**

+ http://id774.net
+ http://github.com/id774


Copyright and license
---------------------

See the file doc/LICENSE.


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kmeans-0.1.1 README.md
kmeans-0.1.0 README.md