def test_six(self):
     additive = UtilitarianStrategies(test_data.movie_set_5_6, test_data.data_set_6)
     movie = additive.multiplicative_utilitarian()
     max_score = additive.get_max_rating_multiplicative()
     self.assertEqual(max_score[0], [100, 180, 48, 378, 630, 648, 180, 432, 210, 384])
     self.assertEqual(max_score[1], 648)
     self.assertEqual(movie, "F")
 def test_one(self):
     additive = UtilitarianStrategies(test_data.movie_set_1, test_data.data_set_1)
     movie = additive.multiplicative_utilitarian()
     max_score = additive.get_max_rating_multiplicative()
     self.assertEqual(max_score[0], [360, 450, 280])
     self.assertEqual(max_score[1], 450)
     self.assertEqual(movie, "B")
 def test_four(self):
     additive = UtilitarianStrategies(test_data.movie_set_4, test_data.data_set_4)
     movie = additive.multiplicative_utilitarian()
     max_score = additive.get_max_rating_multiplicative()
     self.assertEqual(max_score[0], [900, 1176, 441, 756])
     self.assertEqual(max_score[1], 1176)
     self.assertEqual(movie, "B")
 def test_five(self):
     additive = UtilitarianStrategies(test_data.movie_set_5_6, test_data.data_set_5)
     movie = additive.multiplicative_utilitarian()
     max_score = additive.get_max_rating_multiplicative()
     self.assertEqual(max_score[0], [280, 100, 336, 540, 648, 800, 270, 120, 84, 420])
     self.assertEqual(max_score[1], 800)
     self.assertEqual(movie, "F")
 def test_two(self):
     additive = UtilitarianStrategies(test_data.movie_set_2, test_data.data_set_2)
     movie = additive.multiplicative_utilitarian()
     max_score = additive.get_max_rating_multiplicative()
     self.assertEqual(max_score[0], [14, 20])
     self.assertEqual(max_score[1], 20)
     self.assertEqual(movie, "B")
 def test_three(self):
     additive = UtilitarianStrategies(test_data.movie_set_3, test_data.data_set_3)
     movie = additive.multiplicative_utilitarian()
     max_score = additive.get_max_rating_multiplicative()
     self.assertEqual(max_score[0], [1, 1, 1])
     self.assertEqual(max_score[1], 1)
     self.assertEqual(movie, ["A", "B", "C"])
Beispiel #7
0
 def test_one(self):
     additive = UtilitarianStrategies(test_data.movie_set_1, test_data.data_set_1)
     movie = additive.additive_utilitarian()
     max_score = additive.get_max_rating_additive()
     self.assertEqual(max_score[0], [22, 24, 21])
     self.assertEqual(max_score[1], 24)
     self.assertEqual(movie, "B")
Beispiel #8
0
 def test_six(self):
     additive = UtilitarianStrategies(test_data.movie_set_5_6, test_data.data_set_6)
     movie = additive.additive_utilitarian()
     max_score = additive.get_max_rating_additive()
     self.assertEqual(max_score[0], [21, 18, 13, 22, 26, 26, 17, 23, 20, 22])
     self.assertEqual(max_score[1], 26)
     self.assertEqual(movie, ["E", "F"])
Beispiel #9
0
 def test_five(self):
     additive = UtilitarianStrategies(test_data.movie_set_5_6, test_data.data_set_5)
     movie = additive.additive_utilitarian()
     max_score = additive.get_max_rating_additive()
     self.assertEqual(max_score[0], [20, 21, 21, 25, 26, 28, 22, 15, 14, 23])
     self.assertEqual(max_score[1], 28)
     self.assertEqual(movie, "F")
Beispiel #10
0
 def test_four(self):
     additive = UtilitarianStrategies(test_data.movie_set_4, test_data.data_set_4)
     movie = additive.additive_utilitarian()
     max_score = additive.get_max_rating_additive()
     self.assertEqual(max_score[0], [30, 25, 24, 22])
     self.assertEqual(max_score[1], 30)
     self.assertEqual(movie, "A")
Beispiel #11
0
 def test_two(self):
     additive = UtilitarianStrategies(test_data.movie_set_2, test_data.data_set_2)
     movie = additive.additive_utilitarian()
     max_score = additive.get_max_rating_additive()
     self.assertEqual(max_score[0], [9, 9])
     self.assertEqual(max_score[1], 9)
     self.assertEqual(movie, ["A", "B"])
 def get_recommendation(self):
     additive = UtilitarianStrategies(self.movies, self.approval_voted_table())
     return additive.additive_utilitarian()
Beispiel #13
0
 def get_recommendation(self):
     additive = UtilitarianStrategies(self.movies, self.copeland_table())
     return additive.additive_utilitarian()
Beispiel #14
0
 def get_recommendation(self):
     additive = UtilitarianStrategies(self.movies,
                                      self.position_new_ratings())
     return additive.additive_utilitarian()
Beispiel #15
0
 def multiplicative(self):
     data = self.process_data()
     multiplicative = UtilitarianStrategies(data[0], data[1])
     return multiplicative.additive_utilitarian()