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 […]


When building machine learning and artificial intelligence models you’ll often run into situations where a model is not working as well as you would like. Maybe the error rate is too high or the model works fine on the training data, but fails when you apply real world data. What should you do to improve […]


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 […]


This post will discuss how adding regularization to your machine learning algorithms can improve the accuracy of your algorithm. We will walk through an example of regularization in linear regression, and see how different amounts of regularization impact the accuracy.  Under-fitting and Over-fitting When we designing machine learning algorithms we risk over-fitting and under-fitting our […]


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 […]


To be able to solve a problem using machine learning or AI it is important we know how to categorize the problem. Categorizing the problem helps us understand which tools we have available to help us solve problem. This article will help you understand the different types of machine learning problems, and provide examples of algorithms […]