def test_estimate_ratings_4(self):
     movie = ['10624:', '1544919', '964645', '1712360', '1943448', '608114']
     self.assertEqual(
         estimate_ratings(
             movie, CUST_AVG, MOVIE_AVG, CUST_YEAR_AVG, MOVIE_YEARS),
         ['10624:', 3.6, 3.9, 3.8, 4.3, 4.6])
 def test_estimate_ratings_2(self):
     movie = ['10063:', '1544919', '1712360', '964645', '608114']
     self.assertEqual(
         estimate_ratings(
             movie, CUST_AVG, MOVIE_AVG, CUST_YEAR_AVG, MOVIE_YEARS),
         ['10063:', 3.9, 4.1, 4.3, 4.9])
 def test_estimate_ratings_3(self):
     movie = ['10:', '1712360', '1544919']
     self.assertEqual(
         estimate_ratings(
             movie, CUST_AVG, MOVIE_AVG, CUST_YEAR_AVG, MOVIE_YEARS),
         ['10:', 3.9, 3.7])
 def test_estimate_ratings_1(self):
     movie = ['10066:', '1544919', '1712360', '964645', '608114', '1943448']
     self.assertEqual(
         estimate_ratings(
             movie, CUST_AVG, MOVIE_AVG, CUST_YEAR_AVG, MOVIE_YEARS),
         ['10066:', 1.0, 2.2, 2.3, 2.9, 2.7])
Beispiel #5
0
 def test_estimate_ratings_2(self):
     movie = ['10624:', '1064957', '1647722', '87033',
              '2120115', '1352826', '1300733', '1118187', '41422']
     self.assertEqual(estimate_ratings(movie), ['10624:', 3.4, 3.3, 2.6, 4.7, 4.5, 2.7, 2.7, 3.6])
Beispiel #6
0
 def test_estimate_ratings_1(self):
     movie = ['10066:', '1544919', '1712360', '964645', '608114', '1943448']
     self.assertEqual(estimate_ratings(movie), ['10066:', 2.7, 3.4, 3.3, 3.2, 2.4])
Beispiel #7
0
 def test_estimate_ratings_4(self):
     movie = ['10063:', '2646124', '1059193', '2498639', '2232100', '846288', '1891279', '326040', '2220804', '1147138', '477002', '278598', '1085817', '1989258', '1227162']
     self.assertEqual(estimate_ratings(movie), ['10063:', 3.0, 2.0, 2.9, 3.6, 5.0, 3.2, 4.4, 5.0, 1.0, 3.5, 4.8, 5.0, 4.8, 3.8])
Beispiel #8
0
 def test_estimate_ratings_3(self):
     movie = ['10:', '1952305', '1531863']
     self.assertEqual(estimate_ratings(movie), ['10:', 3.1, 3.0])