Question
Implement in Python. Suppose you are hosting a weekly movie night for your friends. Based on new releases, you would like to select the best
Implement in Python.
Suppose you are hosting a weekly movie night for your friends. Based on new releases, you would like to select the best films to watch next week.
You've guessed what kind of movie each of your n friends would like based on mm typical movie attributes: amount of humor, action, scariness, etc. You predict that any given friend with preferences (p1,,p_m)[0,10] will give a movie with attributes (a1,,a_m)[0,1](normalized to sum to one) a rating r[0,10], where r = (1/m)Summation(i=1, m) (p_i)(a_i). Determing the rating each friend will give. Create a vector called 'ratings' where the i-th element is the sum of all of your friends' ratings for the i-th movie. From this vector, determin the most likely preferred movie and store it in the variable 'top'.
Inputs: n(number of friends), m(number of movie attributes), k(number of new movies), get_friend_prefs(i)(Function that outputs a vector of length m with predicted movie attribute preferences p1,,pm of friend i), get_movie_attr(j): Function that outputs a vector of length m with attributes a1,,am of movie j.
Outputs: ratings (vector) , top (most popular movie)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started