6.2 Recommendations Worth a Million: An Introduction to Clustering

6.2 Recommendations Worth a Million: An Introduction to Clustering

Quick Question

Run the cutree function again to create the cluster groups, but this time pick k = 2 clusters. It turns out that the algorithm groups all of the movies that only belong to one specific genre in one cluster (cluster 2), and puts all of the other movies in the other cluster (cluster 1). What is the genre that all of the movies in cluster 2 belong to?

 Action  close
 Adventure  close
 Animation  close
 Children's  close
 Comedy  close
 Crime  close
 Documentary  close
 Drama  check
 Fantasy  close
 Film Noir  close
 Horror  close
 Musical  close
 Mystery  close
 Romance  close
 Sci-Fi  close
 Thriller  close
 War  close
 Western  close
Check Show Solution

Explanation You can redo the cluster grouping with just two clusters by running the following command: clusterGroups = cutree(clusterMovies, k = 2) Then, by using the tapply function just like we did in the video, you can see the average value in each genre and cluster. It turns out that all of the movies in the second cluster belong to the drama genre. Alternatively, you can use colMeans or lapply as explained below Video 7.

Course Info

Learning Resource Types

theaters Lecture Videos
notes Lecture Notes
assignment_turned_in Problem Sets with Solutions