Last active
March 9, 2019 17:06
-
-
Save kozo2/60c48e1b9e0e79c16b98ba740850407a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "numo/narray" | |
require "rumale" | |
samples = Numo::DFloat[[1, 2], [1, 4], [1, 0],[10, 2], [10, 4], [10, 0]] | |
analyzer = Rumale::Clustering::KMeans.new(n_clusters: 2, max_iter: 50) | |
cluster_labels = analyzer.fit_predict(samples) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment