top of page
Search

# COMP 7150 Assignment 2 Solution Python

Updated: Aug 16, 2023

How each problem is graded This is a general guideline. There might be some variant for a specific problem.

• Answering the question in English: 25%

• Thorough answering the question, explaning the findings, discussing the comparison: 10-25%

• Not answering the question in English: 0%.

• Note: An answer is written in English to address a specific question. The answer must come first.

• Code: 50%

• Code is correct: 50%

• Code is correct, but missing some minor elements: 25-40%

• Incorrect solution, but make an effort: 10%-25%

• Empty: 0%

• Note: code is not an answer. Code shows how you get an answer. Code comes after an answer.

• Explanation of code: 10%

• Concise English explanation of solution/code: 10%

• No explanation: 0%

• Testing: 15%

• Providing adequate testing of code: 15%

• Code operational but does not show how the answer(s) were generated: 5%

• Code not runnable or no testing: 0%

How to turn in your assignment

• Export your notebook to an HTML file.

• Upload it to the appropriate folder in Assignments on Canvas.

Each problem is worth 15 points This assignment uses the movielens dataset. You can start with the code below.

import pandas # Load individual tables users = pandas.read_csv('../Datasets/movielens/users.csv'') ratings = pandas.read_csv('../Datasets/movielens/ratings.csv') movies = pandas.read_csv('../Datasets/movielens/movies.csv') # Merge tables mr = pandas.merge(users, ratings) data = pandas.merge(movies, mr)

Problem 1

What are the top-10 best rated genres?

Explain the steps you carry out to get the answer and report your finding.

Problem 2

Here we are only interested in popular genres, each of which has at least 5000 ratings.

What are the top-5 best rated genres among these popular genres?

Explain the steps you carry out to get the answer, and report your finding.

Problem 3

Among the top-5 best rated genres you found in the previous problem, what are the top-20 best rated movies, each of which has at least 100 reviews?

Explain the steps you carry out to get the answer, and report your finding.

Problem 4 Visualize the popularity (rating count) versus quality (average rating) of the top-20 best-rated movies you found in the previous problem. Explain the steps you carry out to get the answer, and report your finding. In particular, draw some conclusions about movies that are both popular and highly rated. Problem 5 Based on your findings in the previous problem, recommend 4 movies that your friends should see. Provide a simple justification for your recommendation based on your analysis. Problem 6 Among the 4 movies you recommended, on average, which ones are preferred by males and which ones are prefered by females? Explain the steps you carry out to get the answer, and report your finding.

Problem 7 Among the 4 movies you recommended, on average, (A) which movie is most liked by the 18 age-group? (B) which movie is most liked by all age groups? Explain the steps you carry out to get the answer, and report your finding.

For 100% Accurate and Perfect Solution: