In this blog post I will show how to implement OCR (optical character recognition) using a Random Forest classifier in Ruby. As our dataset we will be using the MNIST database of handwritten digits and for our Random Forest implementation we will be using Python’s sci-kit learn library. This post also shows how easy it […]


Scikit-learn is a set of simple and efficient tools for machine learning and artificial intelligence built with NumPy and SciPy in Python. This tutorial will walk you through how you can use these tools from Ruby using a gem called PyCall. PyCall will enable you to use the power of Scikit-learn from Python in your […]


In this post I will walk you through how to teach a computer to master a simple video game using the q-learning reinforcement learning algorithm. We will implement the algorithm from scratch in Ruby without the use of external gems. To enable us to illustrate the inner workings of the algorithm we will be teaching […]


In this blog post we will solve a unsupervised clustering problem in Ruby. We will be using the rubygem kmeans-clusterer to setup the problem and cluster the data using the k-mean clustering algorithm. The k-mean clustering algorithm is an algorithm used to divide unlabeled data into a number of clusters of related data. It is […]


In this blog post I will show how to implement a support vector machine (SVM) in Ruby, and how to use it to solve a simple classification problem. We will be using the RubyGem rb-libsvm to help us setup a SVM, train it and make predictions in a minutes. For our dataset we will be using […]


In this blog post I will show how to use neural networks in Ruby to solve a simple classification problem. We will be using the RubyGem ruby-fann to help us setup a network, train and make predictions in a matter of minutes. For our dataset we will be using school admission data, this was also […]


For this blog post we will walk through how to implement a simple classification algorithm in Ruby using logistic regression. We will use the gem liblinear-ruby to help us setup a model, train it and make predictions in a matter of minutes. For this example we will be using school admissions data to make a […]


In this posts I will show how to implement linear regression in Ruby. Using existing Ruby gems we will setup a linear regression model, train the algorithm and make predictions in minutes. For this example we will use historic house prices in Staten Island to predict the value of houses. You can find the code […]