Shaping Up a Fitness Program Recommendation Engine & More [Community Post]

Learn How to Build a Personalized Recommendation Engine for Fitness Programs & Nutritional Supplements

[As community content, this post reflects the views and opinions of the particular author and does not necessarily reflect the official stance of Neo4j.]

The new year has come and gone, along with the first quarter, and likely all our resolutions to workout and get in shape.

If any of you are like me, you may be feeling that about this time, but I’m here to propose that there may be hope. Just maybe, with the right personalization of a lifestyle with recommendations for fitness programs and nutritional supplements that match my fitness and eating goals based on my current fitness level, I could find a strategy to get me back on track.

Building a Recommendation Engine around BeachBody Offerings

I was recently motivated to re-imagine the BeachBody fitness programs and nutritional supplements as a graph with the goal being to recommend fitness programs, nutritional supplements and other users that would be personalized to my user persona.

For those that don’t know, BeachBody is responsible for P90X, INSANITY, T25 and a plethora of other fitness programs that they’ve been distributing via DVD for years. I utilized all publicly available data from their existing website and created several user personas to demonstrate the personalized recommendations and connected data benefits of transforming their existing data into the Neo4j graph database.

Initially, I knew I needed to understand what types of data exist today on their website and determine the relationships between those data types. As I started looking through the site, I found the concepts of
    • Fitness Programs
    • Nutritional Supplements
    • Gear
    • Community
For the initial pass, I chose to ignore Gear and focus on Fitness Programs, Nutritional Supplements and Community.

Fortunately I’ve been in the gym and eating healthy as a lifestyle most of my teenage and adult life (although less so since being married and having a small child — love them both — totally worth it!), so I’m familiar enough with the concepts of working out and eating healthy. This made the next creative step of introducing non-stated, yet implicitly present, concepts into the dataset quite trivial.

The main ideas that I could see fitting nicely between these stated concepts that would allow me to make the recommendations I as a consumer of their products and participant in their community would be interested in receiving were:
    • Workout Goals
    • Eating Goals
    • Muscle Groups
    • Body Areas
    • Workout Types
    • Workout Levels
    • Supplement Types
Fitness Program and Nutrition Recommendation Engine

There are two other key elements when considering a fitness program, and that is any Physical Limitations or Eating Restrictions that I as a consumer may have. This isn’t really discussed anywhere, but is very implicitly present for making really good recommendations for any consumer that has a physical limitation such as asthma, which could make cardio workouts a non-starter.

Unifying Concepts into a Real-Time Recommendation Engine

The next step was to use the generic category structure applied to the fitness programs and nutritional supplements as the key connecting point to unify the concepts, both stated and implicit.

The concepts that I would create were very consumer-centric, meaning the data points I was interested in filling in were ones that would align with what I as a consumer would be interested in getting from my interaction with BeachBody.

I as a consumer have workout and eating goals with varying weights of importance, which will go on the relationships connecting to the nodes that represent these concepts. (See this example in a GraphGist here.)
    • Workout Goals:
      • Weight Loss
      • Fat Burning
      • Get Fit
    • Eating Goals
      • Get Healthy
      • Performance
      • Weight Loss
      • Muscle Enhancement
      • Wellness
I as a consumer have specific muscle groups and body areas with varying degrees of desire for improvement. This will be done by applying weights to the relationships connecting to the nodes that represent these concepts.
    • Muscle Groups
      • Abs
      • Arms
      • Back
      • Chest
      • Legs
      • Shoulders
    • Body Areas
      • Core
      • Full
      • Lower
      • Upper
I as a consumer have preference towards different workout and supplement types so the relationships connecting to the nodes that represent these concepts will also utilize weighted edges.
    • Workout Types
      • Endurance
      • Strength
      • Balance
      • Flexibility
      • Full Body
      • Dance
      • Cardio
      • Express
    • Supplement Types
      • Meal Replacement
      • Weight Loss
      • Wellness
      • Performance
I as a consumer know which workout level I would consider myself to be so this relationship doesn’t required a weighted edge.
    • Workout Levels
      • Beginner
      • Intermediate
      • Advanced

Exploring Fitness and Nutritional Recommendations in a GraphGist

Now that we’ve got the implicit concepts filled in, we just need to connect them to the fitness programs, nutritional supplements and the user personas that will represent groups or demographics of consumers.

Then following that we’ll answer some interesting questions such as:
    • What fitness programs are best to help me accomplish my workout goals?
    • Which nutritional supplements will help me achieve my eating and workout goals?
    • Are there any other users in the community that I can workout with and which workout would be good for us to do together?
Want to see more of these questions answered with examples and Cypher queries? Check out my Fitness and Nutritional Recommendations GraphGist below and see how I set up product cross-selling and recommend a shared fitness program to a pair of different users.