learning-it by example

Back to the video

Recommender From Scratch: Watch 24 Films Find Their Genres

A program learned three numbers for each of 24 made-up films, and films of one genre ended up together in 3D.

Video #195 ยท Machine learning and data science

Steps in the video

  1. 0:00 Three numbers per film, and the genres sorted themselves
  2. 0:30 The idea
  3. 1:05 Setup
  4. 1:24 The made up data
  5. 1:38 The model
  6. 1:59 Training
  7. 2:29 The numbers to beat
  8. 2:46 Training run
  9. 3:12 Watch it learn
  10. 3:36 A recommendation
  11. 4:00 The person in the picture
  12. 4:19 What this does not show
  13. 4:57 Mistakes to avoid
  14. 5:28 My take and next steps
  15. 5:52 Recap

Files

  • data.py (26 lines)
  • factorise.py (33 lines)
  • run.py (40 lines)

Download the code (zip)

Tested with

Python 3.12.15

What this does not show

Made-up ratings with genres built in, so the result is easy: 60 people, 24 films, three factors chosen for the picture, 120 test ratings from one split. No real ratings file, no alternating least squares, no implicit feedback, no cold start. The 3D picture is drawn from the real numbers of this run.

Sources

Learning IT by Example.