Ejemplo n.º 1
0
def test_energyplot():
    with asmod.build_model():
        trace = sample()

    energyplot(trace)
    energyplot(trace, shade=0.5, alpha=0)
    energyplot(trace, kind='hist')
Ejemplo n.º 2
0
def test_energyplot():
    with asmod.build_model():
        trace = sample(cores=1)

    energyplot(trace)
    energyplot(trace, shade=0.5, alpha=0)
    energyplot(trace, kind='hist')
Ejemplo n.º 3
0
def test_plots_categorical():
    # Test single trace
    start, model, _ = simple_categorical()
    with asmod.build_model() as model:
        start = model.test_point
        h = find_hessian(start)
        step = Metropolis(model.vars, h)
        trace = sample(3000, tune=0, step=step, start=start)

        traceplot(trace)
Ejemplo n.º 4
0
def test_plots_categorical():
    # Test single trace
    start, model, _ = simple_categorical()
    with asmod.build_model() as model:
        start = model.test_point
        h = find_hessian(start)
        step = Metropolis(model.vars, h)
        trace = sample(3000, tune=0, step=step, start=start, chains=1)

    traceplot(trace)
Ejemplo n.º 5
0
def test_plots():
    # Test single trace
    with asmod.build_model() as model:
        start = model.test_point
        h = find_hessian(start)
        step = Metropolis(model.vars, h)
        trace = sample(3000, tune=0, step=step, start=start)

        traceplot(trace)
        forestplot(trace)
        plot_posterior(trace)
        autocorrplot(trace)
Ejemplo n.º 6
0
def test_plots():
    # Test single trace
    with asmod.build_model() as model:
        start = model.test_point
        h = find_hessian(start)
        step = Metropolis(model.vars, h)
        trace = sample(3000, step, start)

        traceplot(trace)
        forestplot(trace)
        plot_posterior(trace)
        autocorrplot(trace)