# Recommendation system is supervised or unsupervised?

**URL:** <https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452>\
**Category:** Unsupervised Learning, Recommenders, Reinforcement\
**Tags:** week-module-2\
**Created:** [August 11, 2024, 9:39pm UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452 "2024-08-11T21:39:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarunsaxena1000](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tarunsaxena1000/32/84439_2.png) [@tarunsaxena1000](https://community.deeplearning.ai/u/tarunsaxena1000)\
**Post date:** [August 11, 2024, 9:39pm UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452/1 "2024-08-11T21:39:47Z")

</div>

In this course, we are taught unsupervised learning algorithm, recommendation system, And reinforcement learning.  
Like reinforcement, learning is not a part of supervised or unsupervised learning algorithm.

I want to ask that if recommendation system that is collaborative filtering Algorithm Part of unsupervised learning or Is it part of supervised learning or none?

---

<div class="post-metadata">

**Author:** ![rmwkwok](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rmwkwok/32/126977_2.png) [@rmwkwok](https://community.deeplearning.ai/u/rmwkwok)\
**Post date:** [August 12, 2024, 12:04am UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452/2 "2024-08-12T00:04:10Z")

</div>

Supervised learning uses labelled data, so I think our collaborative filtering is an example of supervised learning.

---

<div class="post-metadata">

**Author:** ![tarunsaxena1000](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tarunsaxena1000/32/84439_2.png) [@tarunsaxena1000](https://community.deeplearning.ai/u/tarunsaxena1000)\
**Post date:** [August 12, 2024, 6:31pm UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452/3 "2024-08-12T18:31:04Z")

</div>

[found this link of a thread helpfull](https://community.deeplearning.ai/t/is-collaborative-filtering-still-unsupervised/259450/2)

it is said there its a part of unsupervised learning.

---

<div class="post-metadata">

**Author:** ![NyashaEysenck](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/nyashaeysenck/32/129339_2.png) [@NyashaEysenck](https://community.deeplearning.ai/u/NyashaEysenck)\
**Post date:** [August 12, 2024, 8:59pm UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452/4 "2024-08-12T20:59:54Z")

</div>

From what I have learned, you can model a recommender system of collaborative filtering as a supervised learning problem, you treat the task of predicting user-item interactions lets say a user rating to a new movie as a regression or classification problem. Other methods such as clustering can be used to model an unsupervised learning recommender system.

---

<div class="post-metadata">

**Author:** ![rmwkwok](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rmwkwok/32/126977_2.png) [@rmwkwok](https://community.deeplearning.ai/u/rmwkwok)\
**Post date:** [August 13, 2024, 1:05am UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452/5 "2024-08-13T01:05:30Z")

</div>

Hello @tarunsaxena1000

Then we simply have different opinions which is normal, because I can also have two different opinions on this myself. 😉 😉 Since I can’t represent the others in that thread, I will share my own different opinions here:

First of all, my understanding of the difference between supervised and unsupervised is whether it is labelled data or not, period.

Now I consider the data (consumed by the model r^{u, i} = w^u \cdot x^i + b^u) that takes the following form as labelled data:

| user u | item i | rating r (label) |
| --- | --- | --- |
| 1 | 2 | 2.5 |
| 2 | 2 | 3.4 |

In this setting, we do gradient descent to train parameters associated with inputs u and i to predict output r to the best. At the end, we will have, for each user and item, one vector of dimension d\_1.

Now, on the other hand, sometimes, people take this problem in _ **another approach** _ such as [the factorization approach with SVD](https://machinelearningmastery.com/singular-value-decomposition-for-dimensionality-reduction-in-python/) which, at the end, can also give us, for each user and item, a vector of dimension d\_2. However, in this case, it is a factorization approach that takes the ratings as input without the need for any labels.

_ **Our approach for** _ collaborative filtering in Course 3 Week 2 is the first one (gradient descent) and thus I will consider it as supervised. Here I think we are talking about that the approach is supervised, not whether the problem (a colaborative filtering problem for recommendation here) is supervised.

Two approaches on the same problem → two views on whether it is supervised or not. This is how I see it. What do you think? 😉

Cheers,  
Raymond

---

<div class="post-metadata">

**Author:** ![Nevermnd](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/nevermnd/32/126021_2.png) [@Nevermnd](https://community.deeplearning.ai/u/Nevermnd)\
**Post date:** [August 13, 2024, 1:51am UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452/6 "2024-08-13T01:51:44Z")

</div>

I am a little shy, because it was a mistake, but as long as I still have @rmwkwok’s support, you can read my paper on this: [HarvardX/MovieLens/Balducci-MovieLens.pdf at main · anthonypaulbalducci/HarvardX · GitHub](https://github.com/anthonypaulbalducci/HarvardX/blob/main/MovieLens/Balducci-MovieLens.pdf) These were my early days.

Oops.

---

<div class="post-metadata">

**Author:** ![rmwkwok](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rmwkwok/32/126977_2.png) [@rmwkwok](https://community.deeplearning.ai/u/rmwkwok)\
**Post date:** [August 13, 2024, 3:30am UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452/7 "2024-08-13T03:30:15Z")

</div>

You know what, Anthony, I knew you would reply when I typed SVD in my last reply. 😄 😄 😄 I knew it!

---

<div class="post-metadata">

**Author:** ![tarunsaxena1000](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tarunsaxena1000/32/84439_2.png) [@tarunsaxena1000](https://community.deeplearning.ai/u/tarunsaxena1000)\
**Post date:** [August 13, 2024, 10:50am UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452/8 "2024-08-13T10:50:58Z")

</div>

Thanks for clarifying it for me @rmwkwok , it helps a lot.  
On web its was getting really confusing as there were mixed opinions. thanks for clearing this confusion.

---

<div class="post-metadata">

**Author:** ![rmwkwok](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rmwkwok/32/126977_2.png) [@rmwkwok](https://community.deeplearning.ai/u/rmwkwok)\
**Post date:** [August 13, 2024, 11:11am UTC](https://community.deeplearning.ai/t/recommendation-system-is-supervised-or-unsupervised/676452/9 "2024-08-13T11:11:39Z")

</div>

You are welcome, @tarunsaxena1000!

-Raymond
