Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Movie Rating Prediction (User-Based Collaborative Filtering)

A C++ implementation of a User-Based Collaborative Filtering (UBCF) recommender system that predicts a user's rating for a movie based on the ratings of similar users.

How it works

  • Ratings are loaded into a nested map: user -> item -> rating.
  • User-to-user similarity is computed with a custom "ITR" similarity measure, combining a triangle-similarity term with a mean/variance-based term, rather than the more common cosine or Pearson similarity.
  • For a given (user, item) pair, the top-k most similar users (similarity > 0.3) who rated that item are used to compute a similarity-weighted average rating prediction.

Input format

Reads from standard input:

train dataset
<userId> <itemId> <rating>
...
test dataset
<userId> <itemId>
...

Outputs one predicted rating per test pair (2 decimal places).

Tech stack

C++ (STL: map, vector, <cmath>), no external dependencies.

Report

Report.docx contains the accompanying written report/analysis for this project.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages