Skip to content
54

Awesome Machine Learning with Ruby

Curated list: Resources for machine learning in Ruby

2.2k stars185 forks103 entriesLast push Dec 26, 2024 (1 year ago)License CC0-1.0

This page lists names, links and short descriptions. The original list on GitHub is the source and belongs to its authors.

Tutorials

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 Libraries

Machine Learning

algorithms in pure Ruby or written in other programming languages with appropriate bindings for Ruby.

In 3 lists

Machine Learning Libraries >Frameworks

LangChain.rb

Build ML/AI-supercharged applications with Ruby's LangChain.

weka

JRuby bindings for Weka, different ML algorithms implemented through Weka.

In 3 lists

ai4r

Artificial Intelligence for Ruby.

In 2 lists

classifier-reborn

General classifier module to allow Bayesian and other types of classifications. [dep: GLS]

In 3 lists

scoruby

Ruby scoring API for PMML (Predictive Model Markup Language).

In 2 lists

rblearn

Feature Extraction and Crossvalidation library.

In 2 lists

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.

In 4 listsDetails

aws-sdk-machinelearning

Machine Learning API of the Amazon Web Services.

In 3 lists

azure_mgmt_machine_learning

Machine Learning API of the Microsoft Azure.

How to evolve neural networks in Ruby using the Machine Learning Workbench

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.

In 3 lists

eps

Bayesian Classification and Linear Regression with exports using PMML and an alternative backend using GSL.

ruby-openai

OpenAI API wrapper

In 5 listsDetails

Instruct

Inspired by Guidance; weave code, prompts and completions together to instruct LLMs to do what you want.

Machine Learning Libraries >Neural networks

neural-net-ruby

Neural network written in Ruby.

ruby-fann

Ruby bindings to the Fast Artificial Neural Network Library (FANN).

In 3 lists

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.

How to evolve neural networks in Ruby using the Machine Learning Workbench

rann

Flexible Ruby ANN implementation with backprop (through-time, for recurrent nets), gradient checking, adagrad, and parallel batch execution.

Machine Learning Libraries >Deep learning

tensor_stream

Ground-up and standalone reimplementation of TensorFlow for Ruby.

red-chainer

Deep learning framework for Ruby.

tensorflow

Ruby bindings for TensorFlow.

In 3 lists

ruby-dnn

Simple deep learning for Ruby.

torch-rb

Ruby bindings for LibTorch using rice.

mxnet

Ruby bindings for mxnet.

Machine Learning Libraries >Kernel methods

rb-libsvm

Support Vector Machines with Ruby and the LIBSVM library. [dep: bundled]

In 4 listsDetails

Machine Learning Libraries >Evolutionary algorithms

How to evolve neural networks in Ruby using the Machine Learning Workbench

simple_ga

Simplest Genetic Algorithms implementation in Ruby.

Machine Learning Libraries >Bayesian methods

linnaeus

Redis-backed Bayesian classifier.

In 2 lists

naive_bayes

Simple Naive Bayes classifier.

In 2 lists

nbayes

Full-featured, Ruby implementation of Naive Bayes.

In 2 lists

Machine Learning Libraries >Decision trees

decisiontree

Decision Tree ID3 Algorithm in pure Ruby. [dep: GraphViz | post].

In 3 lists

Machine Learning Libraries >Clustering

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.

Machine Learning Libraries >Linear classifiers

liblinear-ruby-swig

Ruby interface to LIBLINEAR (much more efficient than LIBSVM for text classification).

In 2 lists

liblinear-ruby

Ruby interface to LIBLINEAR using SWIG.

Machine Learning Libraries >Statistical models

rtimbl

Memory based learners from the Timbl framework.

In 2 lists

lda-ruby

Ruby implementation of the LDA (Latent Dirichlet Allocation) for automatic Topic Modelling and Document Clustering.

In 2 lists

maxent_string_classifier

JRuby maximum entropy classifier for string data, based on the OpenNLP Maxent framework.

In 2 lists

omnicat

Generalized rack framework for text classifications.

In 2 lists

omnicat-bayes

Naive Bayes text classification implementation as an OmniCat classifier strategy. [dep: bundled]

In 2 lists

Machine Learning Libraries >Gradient boosting

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.

Applications of machine learning

phashion

Ruby wrapper around pHash, the perceptual hash library for detecting duplicate multimedia files. [ImageMagick | libjpeg]

In 2 lists

Projects and Code Examples

Wine Clustering

Wine quality estimations clustered with different algorithms.

simple_ga

Simplest Genetic Algorithms implementation in Ruby.

Handwritten Digits Recognition

Handwritten digits recognition using Neural Networks and Ruby.

Heroku buildpacks

GSL and Ruby buildpack

OpenCV and Ruby buildpack

ImageMagick buildpack

Books, Blogs, Channels

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.

Community

SciRuby Mailing List

An active mailing list and an excellent resource to ask questions and learn fine-grained details about DDD/CQRS.

In 23 listsDetails

SciRuby Slack

Red Data Gitter

Reddit

Stack Overflow

Twitter

NonWebRuby

Ruby AI Builders Discord

X Ruby AI group

Mastodon Ruby AI and Data group

LightGBM

Microsoft's fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.

In 8 listsDetails

XGBoost

Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Flink and DataFlow. [Apache2]

In 11 listsDetails

OpenCV

An open source computer vision and machine learning library with extensive support for image and video analysis. Often used for video processing tasks like object detection, tracking, and filtering.

In 7 listsDetails

Graphviz

Cross-platform software to draw graphs in the DOT graph drawing language.

In 2 lists

Gnuplot

X11/XQuartz

X.Org X Window System server for running X11 applications on macOS. šŸŽ 🟢

In 2 lists

ImageMagick

In 2 lists

R

R is a free software environment for statistical computing and graphics.

In 4 lists

Octave

is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and…

In 6 listsDetails

scikit-learn algorithm cheatsheet

Awesome Ruby

Among other awesome items a short list of NLP related projects.

In 7 listsDetails

Ruby NLP

State-of-Art collection of Ruby libraries for NLP.

In 4 listsDetails

Speech and Natural Language Processing

General List of NLP related resources (mostly not for Ruby programmers).

In 5 listsDetails

Scientific Ruby

Linear Algebra, Visualization and Scientific Computing for Ruby.

In 3 lists

iRuby

IRuby kernel for Jupyter (formerly IPython).

In 3 lists

Kiba

Lightweight ETL (Extract, Transform, Load) pipeline.

In 2 lists

Awesome OCR

Multitude of OCR (Optical Character Recognition) resources.

In 4 lists

Awesome TensorFlow

Machine Learning with TensorFlow libraries.

In 7 listsDetails

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.

See category
94

Awesome Rust

rust-unofficial/awesome-rust

A curated list of Rust code and resources.

Freshā˜… 60k1833 entriesPushed today
94

Table of Contents

hesreallyhim/awesome-claude-code

A hand-picked collection of the finest of resources for the most awesome of agents, Claude Code, the undisputed champion of coding companions, from the unstoppable team…

Freshā˜… 55k202 entriesPushed today
94

Awesome Mac

jaywcjlove/awesome-mac

 This project is dedicated to collecting high-quality macOS software and organizing them systematically by different categories for easy search and use.

Freshā˜… 115k1316 entriesPushed today
94

Awesome Agent Skills

VoltAgent/awesome-agent-skills

A curated collection of 1000+ agent skills from official dev teams and the community, compatible with Claude Code, Codex, Gemini CLI, Cursor, and more.

Freshā˜… 35k839 entriesPushed today
94

Awesome Python

vinta/awesome-python

The definitive list that answers "I want to do X in Python, which tool should I use?"

Freshā˜… 324k504 entriesPushed today
94

Awesome C++

fffaraz/awesome-cpp

A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.

Freshā˜… 74k1358 entriesPushed yesterday