blog

  • Home
  • blog
  • PredictionIO: Bootstrapping a Movie Recommendation App

PredictionIO: Bootstrapping a Movie Recommendation App

In this tutorial, I’m going to walk you through PredictionIO, an open-source machine learning server, which allows you to create applications that could do the following:

  • recommend items (e.g. movies, products, food)
  • predict user behavior
  • identify item similarity
  • rank items

You can pretty much build any machine learning application with ease using PredictionIO. You don’t have to deal with numbers and algorithms and you can just concentrate on building the app itself.

Note that this two-part tutorial is a revival of our older PredictionIO post which, due to some changes in the tool, is no longer accurate to such a degree it warranted a full rewrite.

Installation and Configuration

The first thing that you need to do is install PredictionIO and its dependencies. You can do that in one of the following ways:

  1. Launch an AWS Instance
  2. Quick Install Script
  3. Manual Install
  4. Vagrant Install
  5. Docker Install
  6. Terminal.com

We’ll install using the Vagrant method. This way we can play with PredictionIO locally without having to deal with installation headaches. If you’re feeling adventurous, however, feel free to to pick any installation method mentioned in their documentation. Or, if you already have an existing Homestead Improved setup, you can use that instead and then install PredictionIO with the quick install script.

To install PredictionIO with Vagrant, open a terminal and execute the following command to clone the Vagrant file for bringing up the PredictionIO virtual machine.

git clone https://github.com/PredictionIO/PredictionIO-Vagrant.git

Once done, navigate to the directory and switch to the master branch:

cd PredictionIO-Vagrant/
git checkout master

Open the Vagrantfile and change the cpu execution cap and memory setting if you want. By default memory is set to 2048mb and cpu execution cap is 90. If you have more memory and a powerful processor, bump this up to a higher value. Note that cpuexecutioncap can only have a value of up to 100. The default value of 90 here means that a single virtual CPU can use up to 90% of a single host CPU.

config.vm.provider "virtualbox" do |v|
    v.customize ["modifyvm", :id, "--cpuexecutioncap", "90", "--memory", "2048"]
end

In order to expose the virtual machine to the host machine, you need to comment out the following line. Feel free to change the value for the ip if you want.

Continue reading %PredictionIO: Bootstrapping a Movie Recommendation App%

LEAVE A REPLY