slearn is a supervised machine learning gem on top of NMatrix and daru. It uses NMatrix for computation, daru for data handling, and SciRuby visualization gems for visualization of results.

Build Status


K-Means clustering


To install this gem onto your local machine, run bundle exec rake install.
To run the tests use bundle exec rake spec.
To prepare the docs using yard run bundle exec rake doc.


  • daru
  • nmatrix

It is highly recommended that the user uses a plotting gem such as

  • gnuplotrb
  • nyaplot