Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Multi-language implementation of Collaborative filtering algorithm R/mapreduce/spark mllib

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Download the user movie rating dataset

Http://grouplens.org/datasets/movielens/

1) Item-Based, impersonal, everyone sees the same thing

2) User-Based, personalized, everyone sees differently

After analyzing the user's behavior, we can calculate the similar users and items according to the users' preferences, and then make recommendations based on the similar users or items. These are the two branches of collaborative filtering, user-based and item-based collaborative filtering.

When calculating the similarity between users, it takes a user's preference for all items as a vector, while when calculating the similarity between items, it takes all users' preference for an item as a vector. After finding the similarity, we can find the similar neighbors.

3) Model-based (ModelCF)

According to the model, it can be divided into:

1) nearest neighbor model: distance-based collaborative filtering algorithm

2) Latent Factor Mode (SVD): a model based on matrix decomposition

3) Graph: Graph model, social network graph model

Applicable scenario

For an online website, the number of users often exceeds the number of items, and the item data is relatively stable, so calculating the similarity of items is not only

The amount of calculation is small, and there is no need to update frequently. But this situation only applies to e-commerce sites, such as news, blogs and so on.

System recommendation, the situation is often the opposite, the number of items is massive, and frequently updated.

Implementation of object-based Collaborative filtering algorithm in r language

# reference plyr package library (plyr) # read dataset train

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report