A user-based collaborative-filtering movie recommender developed for Duke University's Java Programming: Build a Recommendation System course on Coursera.
This repository contains my coursework implementation built on the course's starter structure. It demonstrates object-oriented design, ratings-data processing, similarity scoring, filtering, and HTML recommendation output; it is not presented as a production recommendation service.
Given a target user's movie ratings, the recommender:
- Loads movie metadata and rater data from CSV files.
- Measures similarity between the target user and other raters.
- Selects raters with the strongest positive similarity.
- Computes weighted recommendation scores.
- Applies configurable eligibility and movie filters.
- Sorts candidates and renders the result as an HTML table.
- In-memory movie and rater databases
- Dot-product user-similarity scoring
- Weighted-average recommendation scores
- Minimum-rater thresholds
- Composable movie filters
- Ranked HTML output
- Graceful handling when no eligible recommendations exist
| Component | Responsibility |
|---|---|
MovieDatabase |
Loads and exposes movie metadata |
RaterDatabase |
Stores ratings and retrieves raters |
FourthRatings |
Computes similarity and weighted recommendations |
Filter implementations |
Restrict candidates by movie attributes |
| Tester and runner classes | Exercise course milestones and generate output |
This separation keeps data access, recommendation logic, filtering, and presentation concerns distinct.
For a target user (u) and another rater (v), the project derives a similarity score from their overlapping ratings. Candidate movie scores are then aggregated from positively similar raters using a similarity-weighted average.
This is a learning implementation of user-based collaborative filtering. It does not include modern ranking models, online learning, cold-start handling, or production evaluation infrastructure.
The repository preserves the course project layout and does not currently include Maven or Gradle build metadata.
Use the course-supported Java/BlueJ environment and the required Duke course libraries and datasets:
- Download or clone the repository.
- Open the relevant project folder in BlueJ.
- Add the course-provided libraries and rating datasets if they are not already available.
- Compile the project.
- Run the tester class for the course milestone you want to reproduce.
- Open the generated HTML output in a browser.
A repository-level .gitignore keeps regenerated .class files and unrelated IDE build
directories out of version control while preserving the BlueJ project metadata used by the course.
A standalone CLI build will require first adding explicit dependency and build configuration.
The generated table can contain:
- Recommendation rank
- Movie title
- Weighted recommendation score
- Additional movie metadata exposed by the selected filters
If no movie satisfies the configured rater threshold and filters, the program reports that no recommendations are available.
This project strengthened my experience with:
- Object-oriented Java design
- Interfaces and composable filters
- Collections and CSV data processing
- Similarity-based recommendation algorithms
- Sorting and weighted aggregation
- Generating browser-readable output from Java
- Course: Java Programming: Build a Recommendation System
- Provider: Duke University via Coursera
- Scope: educational coursework based on course starter materials
- Current repository state: no standalone build metadata or automated CI suite
No repository license is currently included. Course materials and datasets may have separate terms; reuse permission should not be assumed.