This week’s assignment involves working with the previous week’s assignment on movie ratings. I plan on using the previous survey data I’ve gathered from 20 participants and exported into a CSV. I will have to handle any missing ratings or data, since not every participant seen all 19 films listed before I can implement a Global Baseline Estimate recommendation system in R. Using the attached assignment spreadsheet, I will use the implementation algorithm with my data to calculate the the Global Baseline Line within RStudio. Lastly, I’ll be able to generate a recommended next film to watch for at least one participant.
In order to begin this assignment, I’m loading in the dataframe from the GitHub repo that was used last week. The dataset is limited to only the films seen by at least 10 participants, which is half of the 20 people who volunteered for the survey.
survey_results <- "https://raw.githubusercontent.com/shanicesmith98/data-607-assignments/refs/heads/main/week-2-assignment/latest_movies_survey_results_2a.csv"
df <- read.csv(survey_results)
head(df)
## user_id movie_name genre rating
## 1 4 Michael Biographical 5
## 2 20 Michael Biographical 5
## 3 5 The Drama Dark comedy 5
## 4 18 The Drama Dark comedy 5
## 5 3 Spider-Man: Brand New Day Superhero 5
## 6 5 The Drama Dark comedy 5
The movies seen by at least half of the survey participants are Michael, Obsession, Project Hail Mary, The Drama, Spider Man: Brand New Day, The Devil Wears Prada 2, Toy Story 5, and The Sheep Detectives. From here, I begin algorithm.
The Global Baseline Estimate is result of the Mean Movie Rating + Movie’s rating relative to average + User’s rating relative to average.
I will calculate the global mean, while excluding any missing values.
global_mean <- mean(
df$rating,
na.rm = TRUE
)
global_mean
## [1] 4.117647