def __init__(self): super(Exercise, self).__init__() ratings, items_dictionary, user_ids, item_ids, movie_names = loadmovielens.read_movie_lens_data() self.ratings = ratings self.items_dictionary = items_dictionary self.user_ids = user_ids self.item_ids = item_ids self.movie_names = movie_names self.movie_to_ratings = self.build_movie_to_ratings_dict()
import sys, ast import loadmovielens as reader """ ============================================ DO NOT FORGET TO INCLUDE YOUR STUDENT ID ============================================ """ student_ID = '012218686' "load the data into python" ratings, movie_dictionary, user_ids, item_ids, movie_names = reader.read_movie_lens_data() def my_info(): """ :return: DO NOT FORGET to include your student ID as a string, this function is used to evaluate your code and results """ return student_ID def Jaccard_Coefficient(movie_id_1, movie_id_2): """ :param movie_id_1: (integer) id regarding the first movie :param movie_id2: (integer) id regarding the second movie :return: (float) Jaccard_Coefficient regarding these movies based on the given movie IDs ROUND OFF TO THREE DECIMAL DIGITS """ return 0.0