Beispiel #1
0
 def test_GIVEN_one_masked_one_nparray_WHEN_spearman_THEN_spearman_correct(
         self):
     stats = StatsAnalyzer(self.data1, self.missing2)
     res = stats.spearmans_rank()
     assert_that(res[0].spearman, close_to(0.2142857143, 1e-5))
Beispiel #2
0
 def test_GIVEN_missing_vals_WHEN_spearman_THEN_spearman_correct(self):
     stats = StatsAnalyzer(self.missing1, self.missing2)
     res = stats.spearmans_rank()
     assert_that(res[0].spearman, close_to(0.9428571429, 1e-5))
Beispiel #3
0
 def test_GIVEN_no_missing_vals_WHEN_spearman_THEN_spearman_correct(self):
     stats = StatsAnalyzer(self.data1, self.data2)
     res = stats.spearmans_rank()
     assert_that(res[0].spearman, close_to(1.0, 1e-5))
Beispiel #4
0
 def test_GIVEN_one_masked_one_nparray_WHEN_spearman_THEN_spearman_correct(self):
     stats = StatsAnalyzer(self.data1, self.missing2)
     res = stats.spearmans_rank()
     assert_that(res[0].spearman, close_to(0.2142857143, 1e-5))
Beispiel #5
0
 def test_GIVEN_missing_vals_WHEN_spearman_THEN_spearman_correct(self):
     stats = StatsAnalyzer(self.missing1, self.missing2)
     res = stats.spearmans_rank()
     assert_that(res[0].spearman, close_to(0.9428571429, 1e-5))
Beispiel #6
0
 def test_GIVEN_no_missing_vals_WHEN_spearman_THEN_spearman_correct(self):
     stats = StatsAnalyzer(self.data1, self.data2)
     res = stats.spearmans_rank()
     assert_that(res[0].spearman, close_to(1.0, 1e-5))