[RubyNLP | RubyDataScience | RubyInterop]
Curated List of Ruby Machine Learning Links and Resources
Machine Learning is a field of Computational Science - often nested under AI research - with many practical applications due to the ability of resulting algorithms to systematically implement a specific solution without explicit programmer's instructions. Obviously many algorithms need a definition of features to look at or a biggish training set of data to derive the solution from.
This curated list comprises awesome libraries, data sources, tutorials and presentations about Machine Learning utilizing the Ruby programming language.
A lot of useful resources on this list come from the development by The Ruby Science Foundation, our contributors and our own day to day work on various ML applications.
✨ Every contribution is welcome! Add links through pull requests or create an issue to start a discussion.
Follow us on Twitter and please spread
the word using the #RubyML
hash tag!
- ✨ Tutorials
- Machine Learning Libraries
- Applications of machine learning
- Data structures
- Data visualization
- Articles, Posts, Talks, and Presentations
- Projects and Code Examples
- Heroku buildpacks
- Books, Blogs, Channels
- Community
- Related Resources
- License
Please help us to fill out this section! 😃
- Ruby neural networks
- How to implement linear regression in Ruby [code]
- How to implement classification using logistic regression in Ruby
- How to implement simple binary classification using a Neural Network in Ruby [code]
- How to implement classification using a SVM in Ruby [code]
- Unsupervised learning using k-means clustering in Ruby [code]
- Teaching an AI to play a simple game using Q-Learning in Ruby [code]
- Teaching a Neural Network to play a game using Q-Learning in Ruby [code]
- Using the Python scikit-learn machine learning library in Ruby using PyCall [code]
- How to evolve neural networks in Ruby using the Machine Learning Workbench
Machine Learning algorithms in pure Ruby or written in other programming languages with appropriate bindings for Ruby.
- LangChain.rb - Build ML/AI-supercharged applications with Ruby's LangChain.
- weka - JRuby bindings for Weka, different ML algorithms implemented through Weka.
- ai4r - Artificial Intelligence for Ruby.
- classifier-reborn - General classifier module to allow Bayesian and other types of classifications. [dep: GLS]
- scoruby - Ruby scoring API for PMML (Predictive Model Markup Language).
- rblearn - Feature Extraction and Crossvalidation library.
- data_modeler - Model your data with machine learning. Ample test coverage, examples to start fast, complete documentation. Production ready since 1.0.0.
- shogun - Polyfunctional and mature machine learning toolbox with Ruby bindings.
- aws-sdk-machinelearning - Machine Learning API of the Amazon Web Services.
- azure_mgmt_machine_learning - Machine Learning API of the Microsoft Azure.
- machine_learning_workbench - Growing machine learning framework written in pure Ruby, high performance computing using Numo, CUDA bindings through Cumo. Currently implementating neural networks, evolutionary strategies, vector quantization, and plenty of examples and utilities.
- Deep NeuroEvolution - Experimental setup based on the machine_learning_workbench towards searching for deep neural networks (rather than training) using evolutionary algorithms. Applications to the OpenAI Gym using PyCall.
- rumale - Machine Learninig toolkit in Ruby with wide range of implemented algorithms (SVM, Logistic Regression, Linear Regression, Random Forest etc.) and interfaces similar to Scikit-Learn in Python.
- eps - Bayesian Classification and Linear Regression with exports using PMML and an alternative backend using GSL.
- ruby-openai - OpenAI API wrapper
- Instruct - Inspired by Guidance; weave code, prompts and completions together to instruct LLMs to do what you want.
- neural-net-ruby - Neural network written in Ruby.
- ruby-fann - Ruby bindings to the Fast Artificial Neural Network Library (FANN).
- cerebrum - Experimental implementation for Artificial Neural Networks in Ruby.
- tlearn-rb - Recurrent Neural Network library for Ruby.
- brains - Feed-forward neural networks for JRuby based on brains.
- machine_learning_workbench - Framework including pure-Ruby implementation of both feed-forward and recurrent neural networks (fully connected). Training available using neuroevolution (Natural Evolution Strategies algorithms).
- rann - Flexible Ruby ANN implementation with backprop (through-time, for recurrent nets), gradient checking, adagrad, and parallel batch execution.
- tensor_stream - Ground-up and standalone reimplementation of TensorFlow for Ruby.
- red-chainer - Deep learning framework for Ruby.
- tensorflow - Ruby bindings for TensorFlow.
- ruby-dnn - Simple deep learning for Ruby.
- torch-rb - Ruby bindings for LibTorch using rice.
- mxnet - Ruby bindings for mxnet.
- rb-libsvm - Support Vector Machines with Ruby and the LIBSVM library. [dep: bundled]
- machine_learning_workbench - Framework including pure-Ruby implementations of Natural Evolution Strategy algorithms (black-box optimization), specifically Exponential NES (XNES), Separable NES (sNES), Block-Diagonal NES (BDNES) and more. Applications include neural network search/training (neuroevolution).
- simple_ga - Simplest Genetic Algorithms implementation in Ruby.
- linnaeus - Redis-backed Bayesian classifier.
- naive_bayes - Simple Naive Bayes classifier.
- nbayes - Full-featured, Ruby implementation of Naive Bayes.
- decisiontree - Decision Tree ID3 Algorithm in pure Ruby. [dep: GraphViz | post].
- kmeans-clusterer - k-means clustering in Ruby.
- k_means - Attempting to build a fast, memory efficient K-Means program.
- knn - Simple K Nearest Neighbour Algorithm.
- liblinear-ruby-swig - Ruby interface to LIBLINEAR (much more efficient than LIBSVM for text classification).
- liblinear-ruby - Ruby interface to LIBLINEAR using SWIG.
- rtimbl - Memory based learners from the Timbl framework.
- lda-ruby - Ruby implementation of the LDA (Latent Dirichlet Allocation) for automatic Topic Modelling and Document Clustering.
- maxent_string_classifier - JRuby maximum entropy classifier for string data, based on the OpenNLP Maxent framework.
- omnicat - Generalized rack framework for text classifications.
- omnicat-bayes - Naive Bayes text classification implementation as an OmniCat classifier strategy. [dep: bundled]
- xgboost — Ruby bindings for XGBoost. [dep: XGBoost]
- xgb — Ruby bindings for XGBoost. [dep: XGBoost]
- lightgbm — Ruby bindings for LightGBM. [dep: LightGBM]
- flann - Ruby bindings for the FLANN (Fast Library for Approximate Nearest Neighbors). [flann]
- annoy-rb - Ruby bindings for the Annoy (Approximate Nearest Neighbors Oh Yeah).
- hnswlib.rb - Ruby bindings for the Hnswlib that implements approximate nearest neighbor search with Hierarchical Navigable Small World graphs.
- ngt-ruby - Ruby bindings for the NGT (Neighborhood Graph and Tree for Indexing High-dimensional data).
- milvus — Ruby client for Milvus Vector DB.
- pinecone — Ruby client for Pinecone Vector DB.
- qdrant-ruby — Ruby wrapper for the Qdrant vector search database API.
- weaviate-ruby — Ruby wrapper for the Weaviate vector search database API.
- phashion - Ruby wrapper around pHash, the perceptual hash library for detecting duplicate multimedia files. [ImageMagick | libjpeg]
If you're going to implement your own ML algorithms you're probably interested in storing your feature sets efficiently. Look for appropriate data structures in our Data Science with Ruby list.
Please refer to the Data Visualization section on the Data Science with Ruby list.
-
2022
- Discover Machine Learning in Ruby by Justin Bowen [video]
-
2019
- TensorStream: Bringing Machine Learning to Ruby by Joseph Emmanuel Dayo [post]
- Easy machine learning with Ruby using SVMKit by @kojix [post]
-
2018
- Deep Learning Programming on Ruby by Kenta Murata & Yusaku Hatanaka [slides | page]
- How to use trained Keras and TensorFlow machine learning models within Ruby on Rails by Denis Sellu [post]
-
2017
- Scientific Computing on JRuby by Prasun Anand [slides | video | slides | slides]
- Is it Food? An Introduction to Machine Learning by Matthew Mongeau [video | slides]
- Bayes is BAE by Richard Schneeman [video | slides]
- Ruby Roundtable: Machine Learning in Ruby by RubyThursday [video]
-
2016
- Practical Machine Learning with Ruby by Jordan Hudgens [tutorial]
- Deep Learning: An Introduction for Ruby Developers by Geoffrey Litt [slides]
- How I made a pure-Ruby word2vec program more than 3x faster by Kei Sawada [slides]
- Dōmo arigatō, Mr. Roboto: Machine Learning with Ruby by Eric Weinstein [slides | video]
- Building a Recommendation Engine with Machine Learning Techniques by Brian Sam-Bodden [video]
- ✨ SciRuby Machine Learning: Current Status and Future by Kenta Murata [slides | video: jp]
- Ruby Roundtable: Intro to Tensorflow by RubyThursday [video]
-
2015
- Machine Learning made simple with Ruby by Lorenzo Masini [post]
- Using Ruby Machine Learning to Find Paris Hilton Quotes by Rick Carlino [tutorial]
-
2014
- Test Driven Neural Networks by Matthew Kirk [video]
- Five machine learning techniques that you can use in your Ruby apps today by Benjamin Curtis [video | slides]
- Machine Learning for Fun and Profit by John Paul Ashenfelter [video]
-
2013
- Sentiment Analysis using Support Vector Machines in Ruby by Matthew Kirk [video | code]
- Recommender Systems with Ruby by Marcel Caraciolo [slides]
- Detecting Faces with Ruby: FFI in a Nutshell by Marc Berszick [post]
-
2012
- Machine Learning with Ruby, Part One by Vasily Vasinov [tutorial]
- Recurrent Neural Networks in Ruby by Joseph Wilk [post]
- Recommendation Engines using Machine Learning, and JRuby by Matthew Kirk [video]
- Practical Machine Learning and Rails by Andrew Cantino and Ryan Stout [video]
-
2011
- Clustering in Ruby by Colin Drake [post]
- Text Classification using Support Vector Machines in Ruby by Rimas Silkaitis [post]
-
2010
- bayes_motel – Bayesian classification for Ruby by Mike Perham [post]
- Intelligent Ruby: Getting Started with Machine Learning by Ilya Grigorik [video]
-
2009
-
2008
- Support Vector Machines (SVM) in Ruby by Ilya Grigorik [post]
-
2007
- Decision Tree Learning in Ruby by Ilya Grigorik [post]
- Wine Clustering - Wine quality estimations clustered with different algorithms.
- simple_ga - Basic (working) demo of Genetic Algorithms in Ruby.
- Handwritten Digits Recognition - Handwritten digits recognition using Neural Networks and Ruby.
- Kirk, Matthew. Thoughtful Machine Learning: A Test-Driven Approach. O'Reilly, 2014. [Amazon | code]
- Practical Artificial Intelligence - Blog about Artificial Intelligence and Machine Learning with tutorials and code samples in Ruby.
- SciRuby Mailing List
- SciRuby Slack
- Red Data Gitter
- Stack Overflow
- NonWebRuby
- Ruby AI Builders Discord
- X Ruby AI group
- Mastodon Ruby AI and Data group
- LightGBM
- XGBoost
- [GSL (GNU Scientific Library)][gls]
- OpenCV
- Graphviz
- Gnuplot
- X11/XQuartz
- ImageMagick
- R
- Octave
- scikit-learn algorithm cheatsheet
- Awesome Ruby - Among other awesome items a short list of NLP related projects.
- Ruby NLP - State-of-Art collection of Ruby libraries for NLP.
- Speech and Natural Language Processing - General List of NLP related resources (mostly not for Ruby programmers).
- Scientific Ruby - Linear Algebra, Visualization and Scientific Computing for Ruby.
- iRuby - IRuby kernel for Jupyter (formerly IPython).
- Kiba - Lightweight ETL (Extract, Transform, Load) pipeline.
- Awesome OCR - Multitude of OCR (Optical Character Recognition) resources.
- Awesome TensorFlow - Machine Learning with TensorFlow libraries.
- rb-gsl - Ruby interface to the GNU Scientific Library.
- The Definitive Guide to Ruby's C API - Modern Reference and Tutorial on Embedding and Extending Ruby using C programming language.
Awesome ML with Ruby
by Andrei Beliankou and
Contributors.
To the extent possible under law, the person who associated CC0 with
Awesome ML with Ruby
has waived all copyright and related or neighboring rights
to Awesome ML with Ruby
.
You should have received a copy of the CC0 legalcode along with this work. If not, see https://creativecommons.org/publicdomain/zero/1.0/.