Exemple #1
0
def test_mom():
    for num_out in range(1, 49):
        sample_cor = sample
        sample_cor[:num_out] = np.inf
        assert np.abs(median_of_means(sample_cor, num_out, rng)) < 2
Exemple #2
0
def test_normal():
    assert np.abs(median_of_means(sample, 3, rng)) < 1e-1
    assert np.abs(huber(sample, 1)) < 1e-1