1. LPU MCA Semester 1
  2. CAB107
  3. Unit 5

CAB107 · Unit 5: Artificial intelligence techniques

Recommendation systems and reinforcement learning concepts

10 practice questions · in the ETE syllabus

Key points

  • Collaborative filtering uses similar users' behaviour
  • Cold start means no history for a new user or item
  • RL maximises cumulative reward through trial and error
  • Q-update: Q + alpha x (target minus Q)

Collaborative filtering recommends items using the past behaviour or ratings of similar users. Content-based filtering recommends items whose descriptions resemble what the user already liked. Hybrid systems combine both. The cold-start problem arises when new users or items have no history, so reliable recommendations are hard.

Reinforcement learning (RL): an agent in a state s takes an action a, receives a reward and moves to a new state. The goal is to maximise cumulative reward. The exploration versus exploitation trade-off balances trying new actions against using the best known one; an agent that always picks the best-looking action and never tries others may never discover a better action.

Q-learning updates Q(s,a) with:

Q(s,a) = Q(s,a) + alpha x [reward + gamma x max Q(s', a') - Q(s,a)]

Worked example: Q = 2, alpha = 0.1, reward = 1, gamma = 0.9, best next value 5. Target = 1 + 0.9 x 5 = 5.5. Difference = 5.5 - 2 = 3.5. New Q = 2 + 0.1 x 3.5 = 2.35.

q = 2 + 0.1 * (1 + 0.9 * 5 - 2)
print(q)

The value 5.5 is the target and 3.5 the error, not the updated value.

Exam trap: collaborative filtering uses other users' behaviour, not item text; and an epsilon of zero means no exploration at all.

Try two questions

Question 1 · Tier 2, Understand

A reinforcement learning agent uses a discount factor gamma close to 0. How does it behave?

  1. It values distant rewards much more than immediate ones
  2. It values immediate rewards much more than distant ones
  3. It ignores all rewards and acts randomly
  4. It stores no information about states
Show the answer

B. Future rewards are multiplied by gamma per step, so a small gamma makes the agent short-sighted.

Why not A: That behaviour needs gamma near 1.

Why not C: Immediate reward is still valued.

Why not D: The discount factor does not remove state information.

Question 2 · Tier 2, Understand

What is the cold-start problem in recommender systems?

  1. New users or items have no history, so reliable recommendations are hard
  2. The recommendation server cannot start up properly when the data centre is too cold
  3. The model forgets all of the items it has seen after every restart of the server
  4. The ratings are missing for the most popular items in the whole catalogue of products
Show the answer

A. Without interactions, collaborative filtering has nothing to work with.

Why not B: It concerns missing data, not temperature.

Why not C: It is about missing history, not forgetting.

Why not D: Popular items usually have the most ratings.