コード例 #1
0
def test_baoab():

    S = rc.sampler([0, 0, 0], 0.1, rc.llh.isotropic_gaussian, algo='baoab')

    Q = S.sample(100)

    assert (Q.shape == (100, 3))
コード例 #2
0
def test_racecar():

    S = rc.sampler([0, 0, 0], 0.1, rc.llh.isotropic_gaussian, algo='racecar')

    Q = S.sample(100)

    assert (Q.shape == (100, 3))
コード例 #3
0
def test_rwmetropolis():

    S = rc.sampler([0, 0, 0],
                   0.1,
                   rc.llh.isotropic_gaussian,
                   algo='rwmetropolis')

    Q = S.sample(100)

    assert (Q.shape == (100, 3))