Exemplo n.º 1
0
 def test_RANK_Spearman_different_list_sizes(self):
     TEST_DATA = ['classical', 'invented', 'baroque']
     GT_DATA = ['classical', 'instrumental', 'piano', 'baroque']
     spearman = SpearmanRho()
     spearman.load_ground_truth(GT_DATA)
     spearman.load_test(TEST_DATA)
     assert_raises(ValueError, spearman.compute) #Raise: GT & TEST list have different sizes
 def test_RANK_Spearman_different_list_sizes(self):
     TEST_DATA = ['classical', 'invented', 'baroque']
     GT_DATA = ['classical', 'instrumental', 'piano', 'baroque']
     spearman = SpearmanRho()
     spearman.load_ground_truth(GT_DATA)
     spearman.load_test(TEST_DATA)
     assert_raises(ValueError, spearman.compute) #Raise: GT & TEST list have different sizes
Exemplo n.º 3
0
 def test_RANK_Spearman_load_test(self):
     spearman = SpearmanRho()
     spearman.load_test(self.TEST_DATA)
     assert_equal(len(spearman.get_test()), len(self.TEST_DATA))
Exemplo n.º 4
0
 def test_RANK_Spearman_load_test(self):
     spearman = SpearmanRho()
     spearman.load_test(self.TEST_DATA)
     assert_equal(len(spearman.get_test()), len(self.TEST_DATA))