Exemple #1
0
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())
Exemple #2
0
def test_gm_2():
    gm = GeneralizedMean(20.0)
    gm_vals = [gm.f(x) for x in t()]
    assert_array_less(gm_vals, true_t())
Exemple #3
0
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())
Exemple #4
0
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)
Exemple #5
0
def test_gm_2():
    gm = GeneralizedMean(20.0)
    gm_vals = [gm.f(x) for x in t()]
    assert_array_less(gm_vals, true_t())