Online Recommendation Systems: Getting Personal with Gremthon - Part 2

Part two of a pair of posts about online recommendation systems and graph theory.

In Part One of the Recommendation System Blog series, we looked at the underpinnings of an online retailer’s recommendation system using a graph database in addition to an online recommendation system of movie titles. Our visualizations however, only introduced three actors into the system; how might the problem change if we had thousands or millions of other data points to consider? And how does this system have the potential to connect you with better healthcare? In this post, we will explore how to use graph traversals and ranking algorithms to provide more complex product, or in our case healthcare provider recommendations.

Let us revisit a similar example as before, but this time, let’s look at recommendations from a healthcare system standpoint.

Rank by Most Views: GroupCount()

In this example, we want to rank providers by how many people who are similar to you, viewed the same provider you are viewing. One of the most basic ways to quickly calculate a recommendation of providers within this type of system is to do a quick group count on the set of providers who were viewed by people like you (we’ll get to how we can do that later).

In the image above, we take a set of people (shown on the left as vertices of a graph) and look at the entire set of doctors they have viewed. In this system, GroupCount() sorts the providers according to who was viewed the most. “Dr. E” is the highest recommended provider as he was viewed by 5 separate people in the system, while “Dr. B” is the least recommended provider as he was viewed by only one.

At PokitDok, we use Gremthon, a Python implementation of gremlin, to perform graph traversals. Gremthon was created by PokitDok’s Engineer #1, Brian Corbin; you can check out Gremthon on GitHub: https://github.com/pokitdok/gremlin-python

The Gremthon traversal to apply a group count on the providers viewed by consumers who also viewed a certain doctor would be:

While there is a whole field of mathematics which examines different ways to rank the above list, let us look at applying `filters` for improved personal recommendations. First, the input set into this ranking system, shown in the animated gif at the top of this page, was selected according to the one doctor that you viewed and all other consumers who also viewed that doctor. If you’re willing and opt in, we can easily provide a much more personalized recommendation with a few more pieces of information, like your gender and age. Then, once you view a doctor, we can provide a more personal recommendation which ranks the doctors according to those viewed by people with similar age and gender: