Overview

For this assignment, I plan to use the movie ratings I collected for the previous SQL and R assignment to build a Global Baseline Estimate recommendation system in R. The dataset contains ratings from five participants for six movies. The ratings are on a scale from 1 to 5, and movies that a participant did not see are recorded as missing values.

Planned Approach

First, I will load the movie-rating data into R and make sure that the missing ratings are stored as NA instead of zero. I will then calculate the overall average using all of the available ratings in the dataset.

Next, I will calculate the average rating given by each participant and the average rating received by each movie. These averages will be used to measure how each participant and movie differs from the overall average. A participant who usually gives higher ratings will have a positive user bias, while a participant who usually gives lower ratings will have a negative user bias. Movies rated above or below the overall average will have similar movie biases.

For each missing rating, I will use the following Global Baseline Estimate formula:

Estimated rating = Overall average + User bias + Movie bias

After estimating the missing ratings, I will compare the unseen movies available to each participant. The movie with the highest estimated rating will become the recommendation for that participant. Participants who rated every movie will not receive a new recommendation because there are no unseen movies remaining in this dataset.

Missing-Data Strategy

The missing values represent movies that participants have not seen, so I will not replace them with zero. A zero would incorrectly suggest that the participant gave the movie an extremely low rating. I will exclude the missing values when calculating the overall, participant, and movie averages. The Global Baseline Estimate will then be used to predict only the missing ratings.

Anticipated Challenges

The main challenge may be keeping the three parts of the formula organized and making sure missing values are excluded from every average calculation. I will also need to connect each estimated rating to the correct participant and movie. Finally, I will check that the recommendations include only movies the participant has not already rated.

Expected Outcome

The final result will contain an estimated rating for each missing participant-and-movie combination. I will use those estimates to recommend the highest-rated unseen movie for each participant who still has at least one movie left to watch.