How to Build a Discovery Feature for Course Platforms with PredictionIO
17 Sep 2013

Many startups of late are taking the education industry by storm. Take Coursera as an example. It partners with top universities and colleges in the world to offer free higher education courses to anyone in the world. More examples of online course platforms include Udemy, Memrise, edX, Codecademy, Udacity, Treehouse, Lore, Chegg, 2u, Knewton and Minerva Project.

With the increased number and variety of courses on offer, users often have to spend a lot of time browsing the courses and picking what they want. If you are building a similar service, you can make this discovery process more time-efficient by integrating PredictionIO into your app.

We are going to use two examples to show you how to give more relevant choices to users while they are browsing courses, and how to suggest courses to users personally based on their own previous choices, and the preferences of other users who have similar studying patterns.


1. People who like this course may also like….

Udemy and others recommend related courses when users are browsing course information pages. It is similar to Amazon’s famous “Customers Who Bought This Item Also Bought” feature.



Building this feature with PredictionIO takes just a few steps:

Step 1: Install PredictionIO Server

Follow the instructions in to install PredictionIO.

When the installation is complete, go to the PredictionIO Admin Panel to add a new application (app) for the service you are building. You will then obtain an App Key, which is needed later when you integrate the PredictionIO SDK.

Step 2: Install the SDK in Your Development Language

PredictionIO provides SDK in various languages. Python is used in this example. Execute the following shell command. This will install the SDK package on your machine:

Step 3: Integrate the PredictionIO SDK into Your Application for Importing Data

Now you have finished the integration which handles the data import.

Step 4: Create an Item Similarity Engine

To build this “People who like this course may also like….” feature, you need an Item Similarity Engine.

Go to PredictionIO Admin Panel, add an Item Similarity Engine. Specify an engine name that will be used in your code to retrieve prediction results from this engine (this will be explained in the next step). The default algorithm will be deployed automatically. You can fine-tune it later.

When the engine status changes to “Running”, it means the prediction results are ready.

Step 5: Query Prediction Results

By adding the above code, you have fully integrated PredictionIO into your application and have built a new feature of suggesting similar courses for your users!


2. Courses We Recommend to You Personally

Not only that, PredictionIO can help predict users’ future study preferences personally by analyzing their previous choices. These choices are closely linked to the users’ previous choices and truly reflect their interests. This is how Memrise’s course recommendation looks like:


Building this feature with PredictionIO is also straightforward.

Assuming you have installed PredictionIO and have integrated the SDK for importing data as described above, all you need to do is to add a new Item Recommendation Engine, and add code to retrieve prediction results from it.

Step 1: Create an Item Recommendation Engine

The steps are exactly the same as the ones taken for adding the Item Similarity Engine.

Step 2: Query Prediction Results.


With the above code, the personalization feature has been built!

In fact, PredictionIO can go one step further and make it even more personalized for your users. For example, after a user has finished a course, why not send a congratulatory email to the user alongside a few course suggestions? Based upon what other users with similar learning patterns and interests have studied, or simply some popular choices in a related subject. It is up to you what you want to do with PredictionIO to make your app smarter and easier to use!