Movie Recommender
"Your website can be as boring as you want it to be." - Benedict
Movie Recommender is a program designed to take in user preferences about movies in the form of a rating from 0 - 10, compare the user with other users and film critics to find those with similar preferences, and use this data to make movie recommendations. When I started this project, I was not aware that the process of using one user's preferences to make recommendations for another user was a widely researched area of computer science called collaborative filtering; however, as I started researching, I found an overwhelming number of algorithms to try. There were many ways to define 'similar user' and even more ways to use these similar users to generate recommendations. In the first few weeks of SPE, I tested out several different algorithms until I found one that worked.
How it Works
- The user rates at least 20 movies.
- The program takes every other person who has reviewed at least 5 movies in common with the user and calculates the Spearman Rank Correlation Coefficent between the 2 users.
- For every movie that the user has not reviewed, the program takes the subset of similar users (defined as having a Spearman coefficient of at least .4) who have reviewed the movie and calculates the similar users' percentile ranking of the movie (eg, if the user rated 50 movies and the movie in question was ranked 25, the percentile rank would be 50).
- The program weights these percentile ratings based on similarity to the given user and converts this to a numerical rating on the user's scale.
- The program sorts these movies based on predicted user rating to generate the list of recommendations.
The Data File
The data file movies.txt consists of over 26,000 ratings from 0 - 10 of about 3,000 movies. The movies were chosen by taking all movies listed on the-numbers.com that have grossed over $5 million in the box office. Then I took every review from The Movie Review Query Engine for these movies that had either a numerical or letter rating and converted them to a scale of 0 - 10. In addition, whenever a user rates a movie using Movie Recommender, his or her rating is added to the data file to (1) store the data for future use and (2) expand the available data to improve recommendations for other users.
The Program
To run (on Windows):
- Download the .jar file: MovieRecs.jar. Remember where you save it!
- Open the command prompt by pressing Start ---> Run, then type cmd.
- Switch to the directory where you downloaded the file by typing cd filepath. For example, if you saved it in your C: drive, type cd c:. (Or, if you prefer, you can download the .jar file again into the directory listed on your command prompt)
- Type java -jar MovieRecs.jar.
- The program should load, prompting you for your name. If it does not, be sure that the command prompt says the directory where you saved the .jar file.
To use:
The program should be pretty self explanatory.
- When the name prompt comes up, type your name:

- A random movie will come up. If you know the movie, rate it by sliding the slider to the rating you want, 0 being the worst and 10 the best. Then, click submit to submit your rating. A new random movie will appear for you to rate. If you have never seen the movie or don't remember it well enough to rate it, press skip. If you accidentally skip past a movie you want to rate, press 'Back'.

- If you want to see how you rated a movie, press "Add Movie" on the Index Movie Legend, select the movie, and it will show up on the slider. To remove it, select Index Movies --> Remove Index Movie from the menubar.

- You can click on any movie title for more information from The Internet Movie Database.
- Once you have rated at least 20 movies, click Recommendations --> Get Recommendations to see the list of movies that Movie Recommender thinks you will like.
- If you have seen any of the movies that Movie Recommender has picked for you, press 'Rate this Movie' to give your actual rating for the movie. Note: if you rate movies on the recommendations page, you must refresh the list if you want to see an updated list based on your new ratings. To do this, press 'Refresh' on the menubar.
The Source Files
View the source files for this program.