rumale: eighteen gems, and both speedups are opt-in
Rumale is a machine learning library in Ruby
At a glance
- What is it?
- A machine learning library in Ruby with interfaces modelled on scikit-learn, split across eighteen sub-gems in one repository. Matrix multiplication through OpenBLAS and multi-core estimation both require installing a second gem, so the default install uses neither.
- Who is it for?
- rumale suits a Ruby team that wants classical machine learning, support vector machines, tree ensembles, clustering, decomposition and manifold methods behind an API that reads like scikit-learn, and that is prepared to require an extra gem for linear algebra before the algorithms get fast. It does not suit a team that expects deep learning in the box, since that lives in a separate related project built on another runtime.
- Can I use it commercially?
- Yes. BSD-3-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 16 days ago.
- What is it written in?
- Mainly Ruby, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- yoshoku/rumale920 ★ · +2
| Repository | 2026-09-12 | 2026-11-15 |
|---|---|---|
| yoshoku/rumale | 918 | 920 |
2 Stars in the last 64 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Eighteen gems, and three directories break the hyphen convention
The repository is a monorepo of sub-gems rather than one library. The root listing carries seventeen `rumale-` directories alongside `rumale/` itself: clustering, core, decomposition, ensemble, evaluation_measure, feature_extraction, kernel_approximation, kernel_machine, linear_model, manifold, metric_learning, model_selection, naive_bayes, nearest_neighbors, neural_network, pipeline, preprocessing and tree. Seventeen names, and three of them break the convention the other fourteen follow. `rumale-evaluation_measure/`, `rumale-kernel_approximation/` and `rumale-kernel_machine/` use underscores where everything else uses a hyphen. That is not cosmetic for a Ruby project, because gem names map to require paths and the underscore is the character Ruby uses to bridge a name segment to a nested constant. It also means the repository cannot be searched for sub-gems with a single glob on the separator character.
Both performance paths need a second gem installed first
Two speedups are documented and both are opt-in, which is easy to miss because the section is titled Speedup rather than Optional speedups. The first is matrix arithmetic. The library uses Numo::NArray Alternative for typed arrays, and installing the Numo::Linalg Alternative gem lets matrix and vector products run through OpenBLAS. The instructions are to install the gem and then require Numo::Linalg alongside Rumale in your script. The reason it is separate is stated plainly: several machine learning algorithms compute matrix and vector products frequently, so those algorithms are the ones that accelerate. The second is parallelism, realised through the Parallel gem, installed the same way and loaded the same way. Only some estimators expose it, through an `n_jobs` parameter, and giving `n_jobs: -1` uses every processor. A plain install therefore gets neither OpenBLAS nor multiple cores.
Two different GitHub owners are given for the same array gem
The same dependency is linked twice under two accounts. The note near the top of the page, which explains that the array implementation changed at version 2.0.0, links to `yoshoku/numo-narray-alt` under the maintainer's own organisation. The Speedup section, which needs the same library, links to `ruby-numo/numo-narray-alt` under the upstream project. Both are named as the dependency, so a reader following the note and a reader following the speedup section arrive at different repositories for the same gem name. The related linear algebra gem has one link, to the upstream organisation, which is consistent. The note also spells the type correctly as Numo::NArray while the prose it replaced, the older library, is what the migration was away from.
Models are persisted with Ruby's own Marshal format
The worked example shows how a fitted pipeline is saved and reloaded, and the mechanism is Ruby's built-in serialiser rather than anything from the machine learning ecosystem:
File.open('transformer.dat', 'wb') { |f| f.write(Marshal.dump(transformer)) }with the inverse reading the file back through `Marshal.load(File.binread(...))` for both the feature transformer and the classifier. Two files are written, one per object, which means the pair has to be kept in step or the classifier will be applied through a transform that no longer matches. Marshal is Ruby-specific and version-sensitive by design, so a model written by one interpreter is not a portable artefact in the way a saved ONNX graph or a pickle consumed by a fixed library version would be. For a library whose stated ambition is a scikit-learn shaped interface, this is the point where the analogy ends, and it is worth knowing before you build a serving path on those two files.
A Node toolchain exists only to lint commit messages
There is a Node manifest in a Ruby gem monorepo, and its entire dependency set is commit tooling:
"devDependencies": {
"@commitlint/cli": "^21.2.1",
"@commitlint/config-conventional": "^21.2.0",
"husky": "^9.1.7"
},The only script is `prepare` running husky, so the Node install exists to install git hooks that then validate commit messages against the conventional-commits configuration in `commitlint.config.js`. The manifest is marked private, so it is never published, and its name matches the Ruby gem for the convenience of the directory. It coexists with a `Gemfile` and a second `Gemfile.rubocop`, meaning a contributor installs both a Ruby bundle and an npm tree, with the second bundle kept separate so linting dependencies do not mix into the test environment. The rest of the automation is shell: six scripts at the root wrap version bumping, bundle updates, rspec, rubocop, and the two combined test and lint runs.
Documentation is YARD-generated and the project has a Zenodo DOI
Two documentation systems sit side by side. The API reference is generated, configured by a `.yardopts` file at the root and published to a GitHub Pages site, which is what a library with this many sub-gems needs in order to keep eighteen API surfaces navigable. The narrative documentation is the README, and its three examples are each complete enough to run: a pendigits classification walkthrough that downloads the dataset from the LIBSVM tools site, maps the training data into an RBF feature space with a thousand and twenty four components, trains a linear support vector classifier, persists both objects, and prints an accuracy figure; a cross-validation example using stratified five-fold splitting with a fixed seed; and the two speedup sections. A DOI badge points at a Zenodo record, which is the archiving service used for long-term citation of research software.
The array dependency changed at 2.0.0 and the interface follows scikit-learn
The positioning is stated in one line, that Rumale provides machine learning algorithms with interfaces similar to Scikit-Learn in Python, and the algorithm list is long enough to show the scope: support vector machines, logistic regression, ridge, lasso, multi-layer perceptrons, naive Bayes, decision trees, gradient tree boosting and random forests, k-means, Gaussian mixture models, DBSCAN and spectral clustering, multidimensional scaling and t-SNE, Fisher discriminant analysis and neighbourhood component analysis, principal component analysis and non-negative matrix factorisation. The interface shape is visible in the code rather than described: estimators take keyword arguments like `reg_param` and `random_seed`, they are constructed then fitted, a separate `ModelSelection::CrossValidation` object takes an estimator, a splitter and an evaluator, and evaluation measures are their own namespace. That split is the scikit-learn convention and it is what allows cross-validation to work across every estimator without special-casing.
Deep learning is a separate project on a different runtime
The Related Projects section draws a line the README is careful about. One project, named Rumale::SVM, provides the support vector machine algorithms from LIBSVM and LIBLINEAR behind a Rumale interface, which covers the C and C++ implementations the pure-Ruby gem does not. The other, Rumale::Torch, provides learning and inference for neural networks defined in a different runtime, exposed through the same Rumale interface. So the umbrella keeps its shape across the boundary, but the compute does not stay in Ruby. That matters when you read the algorithm list, because a multi-layer perceptron appears in the main library while the heavier neural network work is delegated. The three visible releases, v2.2.0, v2.1.0 and v2.0.2, sit on that line, with the array dependency change landing in the 2.0.0 generation.
Editorial conclusion
rumale suits a Ruby team that wants classical machine learning, support vector machines, tree ensembles, clustering, decomposition and manifold methods behind an API that reads like scikit-learn, and that is prepared to require an extra gem for linear algebra before the algorithms get fast. It does not suit a team that expects deep learning in the box, since that lives in a separate related project built on another runtime. Check four things first. Check that you install the linear algebra gem, because the default path does not link OpenBLAS and every estimator that repeatedly multiplies matrices is slower without it. Check whether you need parallelism, because that is a second optional gem and the parameter that controls it only exists on some estimators. Check which array implementation you are on, since the dependency switched at version 2.0.0. And check how you persist a fitted model, because the documented approach is Ruby's own Marshal format rather than a portable interchange format. The licence is BSD-3-Clause, the default branch was pushed on 2026-09-14, and the newest release is v2.2.0.
Frequently asked questions
How do I install the rumale machine learning gem?
Add gem 'rumale' to your Gemfile and run bundle, or install it directly with gem install rumale. The gem is published on RubyGems and the licence is BSD-3-Clause.
How do I make rumale faster?
Two optional paths, both requiring an extra gem. Install numo-linalg-alt and require it to run matrix and vector products through OpenBLAS, which accelerates the algorithms that multiply matrices most. Install the parallel gem and load it to enable the n_jobs parameter on the estimators that support it, where n_jobs: -1 uses every processor.
Does rumale support deep learning?
Not in the main gem. It ships a multi-layer perceptron among its classical estimators, while neural network learning and inference live in a separate related project that wraps a network defined in another runtime. Support vector machines from LIBSVM and LIBLINEAR are a third related project with the same interface shape.
How does rumale save a trained model?
With Ruby's own Marshal format, writing one file per fitted object, so the feature transformer and the classifier are persisted separately and reloaded with Marshal.load. That makes the artefact Ruby-specific rather than a portable interchange format.
What changed in rumale version 2.0.0?
The typed array dependency switched from Numo::NArray to Numo::NArray Alternative. The note explaining the change links to the maintainer's copy of that repository, while the speedup section links to the upstream copy, so the same gem name resolves to two accounts in one page.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/yoshoku-rumale)Star history chart for your README
[](https://hysenlabs.com/projects/yoshoku-rumale)Was this useful?