def test_b_j_composed_of_one_summand_if_only_one_relevant_pair(self): res = b_j( f=self.default_f, j=2, comparisons=a([ [0, 2], ]), sigma=self.default_sigma, ) self.assertAlmostEqual(res, -.056317811)
def test_b_j_is_zero_when_no_comparisons_contain_j(self): res = b_j( f=self.default_f, j=1, comparisons=a([ [0, 2], [2, 0], ]), sigma=self.default_sigma, ) self.assertAlmostEqual(res, 0.0)
def test_b_j_made_up_of_multiple_terms_if_j_in_multiple_comparisons(self): res = b_j( f=self.default_f, j=2, comparisons=a([ [0, 2], [2, 1], ]), sigma=self.default_sigma, ) self.assertAlmostEqual(res, .151312099)