7 Types of Hybrid Recommendation System

Jeffery chiang
Published in
5 min readJun 26, 2021

--

Combining multiple recommendation system techniques to effectively predict the users’ habit

Recommendation System

In simple words, Recommendation system is to predict the user’s habits.

As the technology advances, the customer behaviors have changed, so does the way people search for their desired products, online shopping has dramatically changed the retail ecosystem. The number of products is increasing fast, but only small portion of the product gets the attention, which cause the long-tail effect. Recommendation System can help to advertise the item with lower popularity.

In practice, it is hard to find a single model that is tailored to fit our dataset. Most of time, combining multiple recommender models is able to result in better performance.

Hybrid Recommendation System

In the article, Hybrid Recommender Systems: Survey and Experiments, Burke classified the hybrid recommender system into 7 approaches in building the hybrid recommender system.

In this post, we are going to talk about the 7 approaches and build a simple mixed hybrid recommender system.

Reference: Burke, R. Hybrid Recommender Systems: Survey and Experiments. User Model User-Adap Inter 12, 331–370 (2002). https://doi.org/10.1023/A:1021240730564

1. Weighted

Figure 1. Weighted Hybrid Recommendation System Image by author

In the weighted recommendation system, we can define a few models that is able to well interpret the dataset. The weighted recommendation system will take the outputs from each of the models and combine the result in static weightings, which the weight does not change across the train and test set.

For example, we can combine a content-based model and a item-item collaborative filtering model, and each takes a weight of 50% toward the final prediction.

The benefit of using the weighted hybrid is that we integrate multiple models to support the dataset on the recommendation process in a linear way.

2. Switching

Figure 2. Switching Recommendation System Image by author

The switching hybrid selects a single recommendation system based on the situation. The model is used to be built for the item-level sensitive dataset, we should set the recommender selector criteria based on the user profile or other features.

The switching hybrid approach introduces an additional layer upon the recommendation model, which select the appropriate model to use. The recommender system is sensitive to the strengths and weakness of the constituent recommendation model.

3. Mixed

Figure 3. Mixed Recommendation System Image by author

Mixed hybrid approach first takes the user profile and features to generate different set of candidate datasets. The recommendation system inputs different set of candidate to the recommendation model accordingly, and combine the prediction to produce the result recommendation.

The mixed hybrid recommendation system is able to make large number of recommendations simultaneously, and fit the partial dataset to the appropriate model in order to have better performance.

4. Feature Combination

Figure 4. Figure Combination Recommendation System Image by author

In feature combination hybrid, We add a virtual contributing recommendation model to the system, which works as feature engineering toward the original user profile dataset.

For example, we can inject features of a collaborative recommendation model into an content-based recommendation model. The hybrid model is capable to consider the collaborative data from the sub system with relying on one model exclusively.

5. Feature Augmentation

Figure 5. Feature Augmentation Recommendation System Image by author

A contributing recommendation model is employed to generate a rating or classification of the user/item profile, which is further used in the main recommendation system to produce the final predicted result.

The feature augmentation hybrid is able to improve the performance of the core system without changing the main recommendation model. For example, by using the association rule, we are able to enhance the user profile dataset. With the augmented dataset, the performance of content-based recommendation model will be improved.

6. Cascade

Figure 6. Cascade Recommendation System Image by author

Cascade hybrid defines a strict hierarchical structure recommendation system, such that the main recommendation system produce the primary result, and we use the secondary model to resolve some minor issues of the primary result, like breaking tie in the scoring.

In practice, most of the dataset are sparse, the secondary recommendation model can be effective against equal scoring issue or missing data issue.

7. Meta-Level

Meta-level hybrid is similar to the feature augmentation hybrid, such that the contributing model is providing augmented dataset to the main recommendation model. Different from the feature augmentation hybrid, meta-level replaces the original dataset with a learned model from the contributing model as the input to the main recommendation model.

Getting Started

In this example, we are going to showcase a simple weighted hybrid recommendation system using the movielens dataset.

Figure 7. Weighted hybrid on Movielens Image by author

By using the user data and the movie data, we can build a content-based model with XGBoost. We are going to build the weighted hybrid with item-item collaborative filtering and XGBoost.

First we load the data and packages.

Next, we perform the feature engineering on our user and movie dataset to fit the model, such that

  • One-hot Encoding on the user’s occupation and movie’s genre
  • Label Encoding on the user’s gender

Recommendation Model Setting

content-based rmse = 0.973963698032199

To build the model 2 — item-item collaborative filtering model, we take the code from the previous post.

rmse of item-item collaborative filtering = 1.0452369678411928

We can build the weighted hybrid by combining the 2 models in linear manner, which is able to result in better performance. As shown in the plot below, we can see that the weight is best when the weight is around 0.8 in our dataset.

Conclusion

A good recommendation system is essential in boosting the sales and better predict the user’s habit. Hybrid recommendation system is one of the most effective way to improve our model. By combining different approaches above, we can better customize our model to fit the recommendation condition and dataset requirements.

Thank you for reading, and wish you a nice day.

--

--

Jeffery chiang
Analytics Vidhya

Data Science | Machine Learning | Mathematics | DevOps