Exemplo n.º 1
0
def test_GGM2(verbose=0):
    shape = 1 
    scale = 1
    mean = 0
    var = 1
    G = GGM(shape,scale,mean,var)
    sx = 1000
    x = -2.5 + nr.randn(sx)
    G.estimate(x)
    if verbose:
        G.parameters()
    b = np.absolute(G.mixt)<0.1
    assert(b)
Exemplo n.º 2
0
def test_GGM1(verbose=0):
    shape = 1 
    scale = 1
    mean = 0
    var = 1
    G = GGM(shape,scale,mean,var)
    sx = 1000
    x = -2.5 + nr.randn(sx)
    G.estimate(x)
    b = np.absolute(G.mean+2.5)<0.5
    if verbose:
        #G.parameters()
        print x.max()
    assert(b)