def test_gm_3(): gm = GeneralizedMean() assert gm.radius == 1.0 gm_vals = [gm.f(x) for x in t()] assert_array_less(gm_vals, true_t())
def test_gm_2(): gm = GeneralizedMean(20.0) gm_vals = [gm.f(x) for x in t()] assert_array_less(gm_vals, true_t())
def test_gm_4(): gm_vals_1 = np.array([GeneralizedMean(1.0).f(x) for x in t()]) gm_vals_5 = np.array([GeneralizedMean(5.0).f(x) for x in t()]) gm_vals_20 = np.array([GeneralizedMean(20.0).f(x) for x in t()]) assert_array_less(gm_vals_1, gm_vals_5) assert_array_less(gm_vals_5, gm_vals_20)