没有合适的资源?快使用搜索试试~ 我知道了~
首页用概率矩阵分解构建音乐推荐引擎(Pytorch)
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/11085293/bg1.jpg)
Building a Music Recommendation
Engine with Probabilistic Matrix
Factorization inPyTorch
Recommendation systems are one of the most widespread forms of
machine learning in modern society. Whether you are looking for
your next show to watch on Netflix or listening to an automated
music playlist on Spotify, recommender systems impact almost all
aspects of the modern user experience. One of the most common
ways to build a recommendation system is with matrix factorization,
which finds ways to predict a user’s rating for a specific product based
on previous ratings and other users’ preferences. In this article, I will
use a dataset of music ratings to build a recommendation engine for
music with PyTorch in an attempt to clarify the details behind the
theory and implementation of a probabilistic matrix factorization
model.
Introduction to Recommendation
Systems
Cameron Wolfe
F
o
ll
ow
Mar 22
·
15 min read
![](https://csdnimg.cn/release/download_crawler_static/11085293/bg2.jpg)
In this section, I will attempt to provide a quick, but comprehensive
introduction to recommendation systems and matrix factorization
before introducing the actual implementation and results for the
music recommendation project.
What is a Recommendation System?
To create a recommendation system, we need a dataset that includes
users, items, and ratings. Users can be customers buying products
from a store, a family streaming a movie from home, or, in our case,
even a person listening to music. Similarly, items are the products
that a user is buying, rating, listening to, etc. Therefore, the data set
for a recommendation system generally has many entries that include
a user-item pair and a value representing the user’s rating for that
item, such as the data set seen below:
User ratings can be collected either explicitly (asking user for a 5 star
ratings, asking whether a user likes a product, etc.) or implicitly
(examining purchase history, mouse movements, listening history,
etc.). Additionally, the values for ratings could be binary (a user
buying a product), discrete (rating a product 1–5 stars), or almost
anything else. In fact, the dataset used for this project represents
ratings as the total number of minutes a user has spent listening to an
Figure 1: Simple Data Set for Recommendation Systems
![](https://csdnimg.cn/release/download_crawler_static/11085293/bg3.jpg)
artist (this is an implicit rating!). Each of the entries in the data set
represents a user-item pairing with a known rating, and, from these
known user-item pairings, a recommendation system tries to predict
user-item ratings that are not yet known. Recommendations may be
created by finding items that are similar to those a user likes (item-
based), finding similar users and recommending the stuff they like
(user-based), or finding a relationship between user-item interactions
as a whole. In this way, the model recommends different items that it
believes the user might enjoy that the user has not yet seen.
It’s pretty easy to understand the purpose and value of a good
recommender system, but here is a nice figure that I believe
summarizes recommendation systems nicely:
What is Matrix Factorization?
Matrix factorization is a common and effective way to implement a
recommendation system. Using the previously-mentioned user-item
dataset (Figure 1), matrix factorization attempts to learn ways to
quantitatively characterize both users and items in a lower-
dimensional space (as opposed to looking at every item the user has
ever rated), such that these characterizations can be used to predict
user behavior and preferences for a known set of possible items. In
recent years, matrix factorization has become increasingly popular
due to its accuracy and scalability.
Figure 2: Recommender systems aim to
fi
nd items that a user enjoys, but
has not yet seen[1]
![](https://csdnimg.cn/release/download_crawler_static/11085293/bg4.jpg)
Using the data set of user-item pairings, one can create a matrix such
that all rows represent different users, all columns represent different
items, and each entry at location (i, j) in the matrix represents user i’s
rating for item j. This matrix is illustrated in the following figure:
In the above figure, each row contains a single user’s ratings for every
item in the set of possible items. However, some of these ratings
might be empty (represented by “???”). These empty spots represent
user-item pairings that are not yet known, or that the
recommendation system is trying to predict. Moreover, this partially-
filled matrix, referred to as a sparse matrix, can be thought of as the
product of two matrices. For example, the above 4x4 matrix could be
created by multiplying two 4x4 matrices with each other, a 4x10
matrix with a 10x4 matrix, a 4x2 matrix with a 2x4 matrix, etc. This
process of decomposing the original matrix into a product of two
matrices is called matrix factorization.
Matrix Factorization for Recommendation
Systems
So, we know that we can decompose a matrix by finding two matrices
that can be multiplied together to form our original matrix. But, how
does matrix factorization actually work in a recommendation system?
Figure 3: A User‑Item Recommendation Matrix
剩余17页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://profile-avatar.csdnimg.cn/484918f6414346dab3a2251988903b79_tox33.jpg!1)
tox33
- 粉丝: 64
- 资源: 304
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
会员权益专享
最新资源
- BSC绩效考核指标汇总 (2).docx
- BSC资料.pdf
- BSC绩效考核指标汇总 (3).pdf
- C5000W常见问题解决方案.docx
- BSC概念 (2).pdf
- ESP8266智能家居.docx
- ESP8266智能家居.pdf
- BSC概念 HR猫猫.docx
- C5000W常见问题解决方案.pdf
- BSC模板:关键绩效指标示例(财务、客户、内部运营、学习成长四个方面).docx
- BSC概念.docx
- BSC模板:关键绩效指标示例(财务、客户、内部运营、学习成长四个方面).pdf
- BSC概念.pdf
- 各种智能算法的总结汇总.docx
- BSC概念 HR猫猫.pdf
- bsc概念hr猫猫.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)