# ML with Ruby (arbox/machine-learning-with-ruby)

> Tutorials, libraries, example projects, books and communities for doing machine learning in the Ruby language.

- Source: https://github.com/arbox/machine-learning-with-ruby (read at commit c8c2503 on 2026-11-30). The selection and order are its curators'.
- This index: https://weeklymatcha.com/lists/arbox/machine-learning-with-ruby
- 106 entries in 19 sections. 2,226 stars. Last push 2024-12-26. Licence CC0-1.0.
- Facts are from GitHub as of 2026-11-30. No descriptions are copied from the list.

## :sparkles: Tutorials

- [Ruby neural networks](https://honeybadger.io/blog/ruby-neural-networks) · https://weeklymatcha.com/item/d4197d6d9a
- [How to implement linear regression in Ruby](https://practicalai.io/implementing-linear-regression-using-ruby) · https://weeklymatcha.com/item/dda883e7b8
- [How to implement classification using logistic regression in Ruby](https://practicalai.io/implementing-classification-using-logistic-regression-in-ruby) · https://weeklymatcha.com/item/a350973137
- [How to implement simple binary classification using a Neural Network in Ruby](https://practicalai.io/implementing-simple-classification-using-neural-network-in-ruby) · https://weeklymatcha.com/item/9d6631f7bc
- [How to implement classification using a SVM in Ruby](https://practicalai.io/implementing-classification-using-a-svm-in-ruby) · https://weeklymatcha.com/item/810a06bc1f
- [Unsupervised learning using k-means clustering in Ruby](https://practicalai.io/unsupervised-learning-using-k-means-clustering-in-ruby) · https://weeklymatcha.com/item/5d0866b374
- [Teaching an AI to play a simple game using Q-Learning in Ruby](https://practicalai.io/teaching-ai-play-simple-game-using-q-learning) · https://weeklymatcha.com/item/70e91efa33
- [Teaching a Neural Network to play a game using Q-Learning in Ruby](https://practicalai.io/teaching-a-neural-network-to-play-a-game-with-q-learning) · https://weeklymatcha.com/item/240a41209b
- [Using the Python scikit-learn machine learning library in Ruby using PyCall](https://practicalai.io/using-scikit-learn-machine-learning-library-in-ruby-using-pycall) · https://weeklymatcha.com/item/fc91355f57
- [How to evolve neural networks in Ruby using the Machine Learning Workbench](https://github.com/giuse/machine_learning_workbench/blob/master/examples/neuroevolution.rb) · https://weeklymatcha.com/item/79b3bb973e

## Machine Learning Libraries

### Frameworks

- [LangChain.rb](https://github.com/patterns-ai-core/langchainrb) · Ruby · 2,006 stars · pushed 2026-11-30 · MIT · in 2 lists · https://weeklymatcha.com/gh/patterns-ai-core/langchainrb
- [weka](https://github.com/paulgoetze/weka-jruby) · Ruby · 65 stars · pushed 2026-06-24 · MIT · in 3 lists · https://weeklymatcha.com/gh/paulgoetze/weka-jruby
- [ai4r](https://github.com/sergiofierens/ai4r) · Ruby · 722 stars · pushed 2025-07-18 · NOASSERTION · in 2 lists · https://weeklymatcha.com/gh/sergiofierens/ai4r
- [classifier-reborn](https://github.com/jekyll/classifier-reborn) · Ruby · 559 stars · pushed 2024-05-27 · LGPL-2.1 · in 3 lists · quiet · https://weeklymatcha.com/gh/jekyll/classifier-reborn
- [scoruby](https://github.com/asafschers/scoruby) · Ruby · 70 stars · pushed 2022-10-19 · MIT · in 2 lists · quiet · https://weeklymatcha.com/gh/asafschers/scoruby
- [rblearn](https://github.com/himkt/rblearn) · Ruby · 2 stars · pushed 2016-08-03 · MIT · in 2 lists · quiet · https://weeklymatcha.com/gh/himkt/rblearn
- [data_modeler](https://github.com/giuse/data_modeler) · Ruby · 1 stars · pushed 2017-06-28 · MIT · quiet · https://weeklymatcha.com/gh/giuse/data_modeler
- [shogun](https://github.com/shogun-toolbox/shogun) · C++ · 3,083 stars · pushed 2023-12-19 · BSD-3-Clause · in 4 lists · quiet · https://weeklymatcha.com/gh/shogun-toolbox/shogun
- [aws-sdk-machinelearning](https://github.com/aws/aws-sdk-ruby) · Ruby · 3,652 stars · pushed 2026-11-29 · Apache-2.0 · in 3 lists · https://weeklymatcha.com/gh/aws/aws-sdk-ruby
- [azure_mgmt_machine_learning](https://github.com/azure/azure-sdk-for-ruby) · Ruby · 276 stars · pushed 2023-01-10 · MIT · archived · https://weeklymatcha.com/gh/azure/azure-sdk-for-ruby
- [machine_learning_workbench](https://github.com/giuse/machine_learning_workbench) · Ruby · 20 stars · pushed 2021-11-02 · MIT · quiet · https://weeklymatcha.com/gh/giuse/machine_learning_workbench
- [Deep NeuroEvolution](https://github.com/giuse/dne) · Ruby · 127 stars · pushed 2019-12-31 · MIT · quiet · https://weeklymatcha.com/gh/giuse/dne
- [rumale](https://github.com/yoshoku/rumale) · Ruby · 920 stars · pushed 2026-11-29 · BSD-3-Clause · in 3 lists · https://weeklymatcha.com/gh/yoshoku/rumale
- [eps](https://github.com/ankane/eps) · Ruby · 693 stars · pushed 2026-10-17 · MIT · https://weeklymatcha.com/gh/ankane/eps
- [ruby-openai](https://github.com/alexrudall/ruby-openai) · Ruby · 3,216 stars · pushed 2026-05-01 · MIT · in 3 lists · https://weeklymatcha.com/gh/alexrudall/ruby-openai
- [Instruct](https://github.com/instruct-rb/instruct) · Ruby · 49 stars · pushed 2025-02-07 · Apache-2.0 · https://weeklymatcha.com/gh/instruct-rb/instruct

### Neural networks

- [neural-net-ruby](https://github.com/gbuesing/neural-net-ruby) · Ruby · 126 stars · pushed 2017-07-02 · quiet · https://weeklymatcha.com/gh/gbuesing/neural-net-ruby
- [ruby-fann](https://github.com/tangledpath/ruby-fann) · C · 506 stars · pushed 2024-03-25 · MIT · in 3 lists · quiet · https://weeklymatcha.com/gh/tangledpath/ruby-fann
- [cerebrum](https://github.com/irfansharif/cerebrum) · Ruby · 36 stars · pushed 2019-03-03 · MIT · quiet · https://weeklymatcha.com/gh/irfansharif/cerebrum
- [tlearn-rb](https://github.com/josephwilk/tlearn-rb) · C · 97 stars · pushed 2018-01-04 · quiet · https://weeklymatcha.com/gh/josephwilk/tlearn-rb
- [brains](https://github.com/jedld/brains-jruby) · Ruby · 60 stars · pushed 2017-03-20 · MIT · quiet · https://weeklymatcha.com/gh/jedld/brains-jruby
- [machine_learning_workbench](https://github.com/giuse/machine_learning_workbench/tree/master/lib/machine_learning_workbench/neural_network) · https://weeklymatcha.com/item/0ee6ccfe1a
- [rann](https://github.com/mikecmpbll/rann) · Ruby · 3 stars · pushed 2017-12-11 · Apache-2.0 · quiet · https://weeklymatcha.com/gh/mikecmpbll/rann

### Deep learning

- [tensor_stream](https://github.com/jedld/tensor_stream) · Ruby · 502 stars · pushed 2020-12-26 · MIT · quiet · https://weeklymatcha.com/gh/jedld/tensor_stream
- [red-chainer](https://github.com/red-data-tools/red-chainer) · Ruby · 103 stars · pushed 2022-01-05 · MIT · quiet · https://weeklymatcha.com/gh/red-data-tools/red-chainer
- [tensorflow](https://github.com/somaticio/tensorflow.rb) · Ruby · 827 stars · pushed 2022-01-10 · BSD-3-Clause · in 2 lists · quiet · https://weeklymatcha.com/gh/somaticio/tensorflow.rb
- [ruby-dnn](https://github.com/unagiootoro/ruby-dnn) · Ruby · 46 stars · pushed 2023-07-04 · MIT · quiet · https://weeklymatcha.com/gh/unagiootoro/ruby-dnn
- [torch-rb](https://github.com/ankane/torch.rb) · Ruby · 842 stars · pushed 2026-11-14 · NOASSERTION · in 2 lists · https://weeklymatcha.com/gh/ankane/torch.rb
- [mxnet](https://github.com/mrkn/mxnet.rb) · Ruby · 48 stars · pushed 2020-12-22 · MIT · quiet · https://weeklymatcha.com/gh/mrkn/mxnet.rb

### Kernel methods

- [rb-libsvm](https://github.com/febeling/rb-libsvm) · C++ · 279 stars · pushed 2023-12-07 · BSD-3-Clause · in 4 lists · quiet · https://weeklymatcha.com/gh/febeling/rb-libsvm

### Evolutionary algorithms

- [machine_learning_workbench](https://github.com/giuse/machine_learning_workbench/tree/master/lib/machine_learning_workbench/optimizer/natural_evolution_strategies) · https://weeklymatcha.com/item/89dfb5063d
- [simple_ga](https://github.com/giuse/simple_ga) · Ruby · 11 stars · pushed 2016-10-26 · MIT · quiet · https://weeklymatcha.com/gh/giuse/simple_ga

### Bayesian methods

- [linnaeus](https://github.com/djcp/linnaeus) · Ruby · 37 stars · pushed 2015-12-26 · MIT · in 2 lists · quiet · https://weeklymatcha.com/gh/djcp/linnaeus
- [naive_bayes](https://github.com/reddavis/naive-bayes) · Ruby · 49 stars · pushed 2012-01-29 · MIT · in 2 lists · quiet · https://weeklymatcha.com/gh/reddavis/naive-bayes
- [nbayes](https://github.com/oasic/nbayes) · Ruby · 155 stars · pushed 2024-02-12 · MIT · in 2 lists · quiet · https://weeklymatcha.com/gh/oasic/nbayes

### Decision trees

- [decisiontree](https://github.com/igrigorik/decisiontree) · Ruby · 1,504 stars · pushed 2018-10-31 · in 3 lists · quiet · https://weeklymatcha.com/gh/igrigorik/decisiontree

### Clustering

- [kmeans-clusterer](https://github.com/gbuesing/kmeans-clusterer) · Ruby · 99 stars · pushed 2020-09-21 · MIT · quiet · https://weeklymatcha.com/gh/gbuesing/kmeans-clusterer
- [k_means](https://github.com/reddavis/k-means) · Ruby · 113 stars · pushed 2016-06-16 · MIT · archived · https://weeklymatcha.com/gh/reddavis/k-means
- [knn](https://github.com/reddavis/knn) · Ruby · 37 stars · pushed 2020-05-22 · MIT · quiet · https://weeklymatcha.com/gh/reddavis/knn

### Linear classifiers

- [liblinear-ruby-swig](https://github.com/tomz/liblinear-ruby-swig) · C++ · 83 stars · pushed 2023-06-27 · NOASSERTION · in 2 lists · quiet · https://weeklymatcha.com/gh/tomz/liblinear-ruby-swig
- [liblinear-ruby](https://github.com/kei500/liblinear-ruby) · C++ · 82 stars · pushed 2019-03-29 · MIT · quiet · https://weeklymatcha.com/gh/kei500/liblinear-ruby

### Statistical models

- [rtimbl](https://github.com/maspwr/rtimbl) · C++ · 5 stars · pushed 2009-10-23 · MIT · in 2 lists · quiet · https://weeklymatcha.com/gh/maspwr/rtimbl
- [lda-ruby](https://github.com/ealdent/lda-ruby) · Ruby · 135 stars · pushed 2026-05-04 · LGPL-2.1 · in 2 lists · https://weeklymatcha.com/gh/ealdent/lda-ruby
- [maxent_string_classifier](https://github.com/mccraigmccraig/maxent_string_classifier) · Ruby · 9 stars · pushed 2009-07-06 · in 2 lists · quiet · https://weeklymatcha.com/gh/mccraigmccraig/maxent_string_classifier
- [omnicat](https://github.com/mustafaturan/omnicat) · Ruby · 11 stars · pushed 2021-01-13 · MIT · in 2 lists · quiet · https://weeklymatcha.com/gh/mustafaturan/omnicat
- [omnicat-bayes](https://github.com/mustafaturan/omnicat-bayes) · Ruby · 31 stars · pushed 2021-01-13 · MIT · in 2 lists · quiet · https://weeklymatcha.com/gh/mustafaturan/omnicat-bayes

### Gradient boosting

- [xgboost](https://github.com/paironair/xgboost-ruby) · Ruby · 20 stars · pushed 2018-04-12 · MIT · quiet · https://weeklymatcha.com/gh/paironair/xgboost-ruby
- [xgb](https://github.com/ankane/xgboost-ruby) · Ruby · 121 stars · pushed 2026-09-09 · Apache-2.0 · https://weeklymatcha.com/gh/ankane/xgboost-ruby
- [lightgbm](https://github.com/ankane/lightgbm-ruby) · Ruby · 85 stars · pushed 2026-07-18 · MIT · https://weeklymatcha.com/gh/ankane/lightgbm-ruby

### Vector search

- [flann](https://github.com/flann-lib/flann) · C++ · 2,382 stars · pushed 2024-07-29 · NOASSERTION · quiet · https://weeklymatcha.com/gh/flann-lib/flann
- [annoy-rb](https://github.com/yoshoku/annoy-rb) · C++ · 37 stars · pushed 2026-09-18 · Apache-2.0 · https://weeklymatcha.com/gh/yoshoku/annoy-rb
- [hnswlib.rb](https://github.com/yoshoku/hnswlib.rb) · C++ · 15 stars · pushed 2026-11-03 · Apache-2.0 · https://weeklymatcha.com/gh/yoshoku/hnswlib.rb
- [ngt-ruby](https://github.com/ankane/ngt-ruby) · Ruby · 53 stars · pushed 2026-04-02 · Apache-2.0 · https://weeklymatcha.com/gh/ankane/ngt-ruby
- [milvus](https://github.com/patterns-ai-core/milvus) · Ruby · 34 stars · pushed 2026-10-22 · Apache-2.0 · https://weeklymatcha.com/gh/patterns-ai-core/milvus
- [pinecone](https://github.com/scotterc/pinecone) · Ruby · 68 stars · pushed 2026-03-18 · MIT · https://weeklymatcha.com/gh/scotterc/pinecone
- [qdrant-ruby](https://github.com/patterns-ai-core/qdrant-ruby) · Ruby · 62 stars · pushed 2026-10-21 · Apache-2.0 · https://weeklymatcha.com/gh/patterns-ai-core/qdrant-ruby
- [weaviate-ruby](https://github.com/patterns-ai-core/weaviate-ruby) · Ruby · 59 stars · pushed 2026-10-21 · MIT · https://weeklymatcha.com/gh/patterns-ai-core/weaviate-ruby

## Applications of machine learning

- [phashion](https://github.com/westonplatter/phashion) · Ruby · 713 stars · pushed 2025-10-23 · MIT · in 2 lists · https://weeklymatcha.com/gh/westonplatter/phashion

## Projects and Code Examples

- [Wine Clustering](https://github.com/hexgnu/wine_clustering) · Ruby · 0 stars · pushed 2014-04-02 · quiet · https://weeklymatcha.com/gh/hexgnu/wine_clustering
- [simple_ga](https://github.com/giuse/simple_ga) · Ruby · 11 stars · pushed 2016-10-26 · MIT · quiet · https://weeklymatcha.com/gh/giuse/simple_ga
- [Handwritten Digits Recognition](https://github.com/jdrzj/handwritten-digits-recognition) · Ruby · 6 stars · pushed 2021-03-09 · quiet · https://weeklymatcha.com/gh/jdrzj/handwritten-digits-recognition

## Heroku buildpacks

- [GSL and Ruby buildpack](https://github.com/tomwolfe/heroku-buildpack-gsl-ruby) · Ruby · 3 stars · pushed 2020-08-15 · MIT · quiet · https://weeklymatcha.com/gh/tomwolfe/heroku-buildpack-gsl-ruby
- [OpenCV and Ruby buildpack](https://github.com/nowaterlili/heroku-buildpack-ruby-opencv) · Ruby · 3 stars · pushed 2014-04-29 · MIT · quiet · https://weeklymatcha.com/gh/nowaterlili/heroku-buildpack-ruby-opencv
- [ImageMagick buildpack](https://github.com/mcollina/heroku-buildpack-imagemagick) · Shell · 46 stars · pushed 2015-01-31 · quiet · https://weeklymatcha.com/gh/mcollina/heroku-buildpack-imagemagick

## Books, Blogs, Channels

- [Kirk, Matthew](https://twitter.com/mjkirk) · https://weeklymatcha.com/item/f32c96102c
- [Practical Artificial Intelligence](https://practicalai.io/) · https://weeklymatcha.com/item/ffb4de9013

## Community

- [SciRuby Mailing List](https://groups.google.com/forum#!forum/sciruby-dev) · https://weeklymatcha.com/item/2401560aa4
- [SciRuby Slack](https://sciruby.slack.com/) · https://weeklymatcha.com/item/2309cf1447
- [Red Data Gitter](https://gitter.im/red-data-tools) · https://weeklymatcha.com/item/ac3d231b5b
- [Reddit](https://reddit.com/r/MachineLearning/search?q=Ruby&restrict_sr=on) · https://weeklymatcha.com/item/92230e93d2
- [Stack Overflow](https://stackoverflow.com/search?q=machine+learning+ruby) · https://weeklymatcha.com/item/51d6b352e6
- [Twitter](https://twitter.com/search?q=Machine%20Learning%20Ruby&src=typd) · https://weeklymatcha.com/item/4699ff6ca9
- [NonWebRuby](https://twitter.com/NonWebRuby) · https://weeklymatcha.com/item/a42cdb36a3
- [Ruby AI Builders Discord](https://discord.gg/zDyFJFBTGB) · https://weeklymatcha.com/item/f1f31834ef
- [X Ruby AI group](https://twitter.com/i/communities/1709211359039078677) · https://weeklymatcha.com/item/081f3f6308
- [Mastodon Ruby AI and Data group](https://ruby.social/@Ruby_AI_and_Data@chirp.social) · https://weeklymatcha.com/item/9faada767f

## Related Resources

- [LightGBM](https://github.com/lightgbm-org/lightgbm) · C++ · 19,028 stars · pushed 2026-11-30 · MIT · in 6 lists · https://weeklymatcha.com/gh/lightgbm-org/lightgbm
- [XGBoost](https://github.com/dmlc/xgboost) · C++ · 29,035 stars · pushed 2026-11-29 · Apache-2.0 · in 6 lists · https://weeklymatcha.com/gh/dmlc/xgboost
- [OpenCV](https://opencv.org/) · in 2 lists · https://weeklymatcha.com/item/d9fa580077
- [Graphviz](http://graphviz.org/) · in 2 lists · https://weeklymatcha.com/item/b0c49e0d6f
- [Gnuplot](http://gnuplot.info/) · in 2 lists · https://weeklymatcha.com/item/b9f6378b90
- [X11/XQuartz](https://xquartz.org/) · https://weeklymatcha.com/item/217948a33d
- [ImageMagick](https://imagemagick.org/script/index.php) · https://weeklymatcha.com/item/b649858e1c
- [R](http://r-project.org/) · in 4 lists · https://weeklymatcha.com/item/3d551864ba
- [Octave](https://gnu.org/software/octave) · in 4 lists · https://weeklymatcha.com/item/79d53a6a52
- [scikit-learn algorithm cheatsheet](https://scikit-learn.org/stable/tutorial/machine_learning_map) · https://weeklymatcha.com/item/5ec7962125
- [Awesome Ruby](https://github.com/markets/awesome-ruby) · 14,192 stars · pushed 2026-11-17 · in 4 lists · https://weeklymatcha.com/gh/markets/awesome-ruby
- [Ruby NLP](https://github.com/diasks2/ruby-nlp) · 1,284 stars · pushed 2023-03-05 · in 3 lists · quiet · https://weeklymatcha.com/gh/diasks2/ruby-nlp
- [Speech and Natural Language Processing](https://github.com/edobashira/speech-language-processing) · 2,226 stars · pushed 2019-04-02 · in 4 lists · quiet · https://weeklymatcha.com/gh/edobashira/speech-language-processing
- [Scientific Ruby](http://sciruby.com/) · in 3 lists · https://weeklymatcha.com/item/5484b009bb
- [iRuby](https://github.com/sciruby/iruby) · Ruby · 926 stars · pushed 2026-06-30 · MIT · in 3 lists · https://weeklymatcha.com/gh/sciruby/iruby
- [Kiba](https://github.com/thbar/kiba) · Ruby · 1,776 stars · pushed 2026-01-10 · NOASSERTION · https://weeklymatcha.com/gh/thbar/kiba
- [Awesome OCR](https://github.com/kba/awesome-ocr) · 3,128 stars · pushed 2024-07-06 · CC0-1.0 · in 3 lists · quiet · https://weeklymatcha.com/gh/kba/awesome-ocr
- [Awesome TensorFlow](https://github.com/jtoy/awesome-tensorflow) · 17,533 stars · pushed 2026-02-08 · CC0-1.0 · in 5 lists · https://weeklymatcha.com/gh/jtoy/awesome-tensorflow
- [rb-gsl](https://github.com/sciruby/rb-gsl) · C · 104 stars · pushed 2024-06-03 · NOASSERTION · quiet · https://weeklymatcha.com/gh/sciruby/rb-gsl
- [The Definitive Guide to Ruby's C API](https://silverhammermba.github.io/emberb) · https://weeklymatcha.com/item/cbb21b280d
