コード例 #1
0
    msg = "model evidence: " + str(D['lnZ']) + \
          " +/- " + str(D['dlnZ'])
    cc.WP(msg, D['wrt_file'])

    cp.plot_hist(flattrace,
                 D['pname'],
                 D['pname_plt'],
                 param_true=D['param_true'],
                 pltname=D['outname'])

    cc.coef_summary(flattrace, D['pname'], D['outname'])

    bounds = ((.25, 2.1), (-.8, 2.2), (0, .6))
    cp.plot_cov(flattrace,
                D['pname_plt'],
                param_true=D['param_true'],
                bounds=bounds,
                figsize=[5.5, 5.5],
                pltname=D['outname'])

    cp.plot_prediction(flattrace,
                       D['name_list'],
                       D['Tt'],
                       D['At'],
                       D['It'],
                       feval,
                       D,
                       colorL=['k', 'r'],
                       param_true=D['param_true'],
                       ylim=(1.1, 2.2),
                       pltname=D['outname'])
コード例 #2
0
ファイル: beta_quad.py プロジェクト: npaulson/UnaryBayes
    WP(msg, D['wrt_file'])

    msg = "model evidence: " + str(D['lnZ']) + \
          " +/- " + str(D['dlnZ'])
    cc.WP(msg, D['wrt_file'])

    cc.coef_summary(flattrace, D['pname'], D['wrt_file'])

    nxtprior = np.zeros((2, D['nparam']))
    nxtprior[0, :] = np.mean(flattrace, 0) - 5*np.std(flattrace, 0)
    nxtprior[1, :] = 10*np.std(flattrace, 0)
    np.savetxt(D['outname'] + '_prior.csv', nxtprior)

    cp.plot_hist(flattrace, D['pname'], D['pname_plt'], pltname=D['outname'])

    cp.plot_cov(flattrace, D['pname_plt'], pltname=D['outname'],
                tight_layout=False)

    """configure model prediction plots for Cp, H, S and G"""
    name_list_l = [D['name_list_Cp'], D['name_list_H'], None, None]
    Tt_l = [D['Tt_Cp'], D['Tt_H'], None, None]
    At_l = [D['At_Cp'], D['At_H'], None, None]
    Etr_l = [D['Etr_Cp'], D['Etr_H'], None, None]
    It_l = [D['It_Cp'], D['It_H'], None, None]
    pltper = [1, 1, 0, 0]
    xlim = [[(1800, 2600)], [(1800, 2600)], None, None]
    ylim = [[(24, 40)], [(47000, 85000)], None, None]
    on = D['outname']
    pltname = [[on + 'Cp', on + 'Cp_close', on + 'Cp_vclose'],
               [on + 'H'],
               [on + 'S'],
               [on + 'G']]
コード例 #3
0
    msg = "model evidence: " + str(D['lnZ']) + \
          " +/- " + str(D['dlnZ'])
    cc.WP(msg, D['wrt_file'])

    cp.plot_hist(flattrace,
                 D['pname'],
                 D['pname_plt'],
                 param_true=D['param_true'],
                 pltname=D['outname'])

    cc.coef_summary(flattrace, D['pname'], D['outname'])

    cp.plot_cov(flattrace[:, :3],
                D['pname_plt'][3:],
                param_true=D['param_true'][3:],
                figsize=[5.5, 5.5],
                sciform=True,
                pltname=D['outname'] + '_Cp')

    cp.plot_cov(flattrace[:, 3:],
                D['pname_plt'][3:],
                param_true=D['param_true'][3:],
                figsize=[5.5, 5.5],
                sciform=True,
                pltname=D['outname'] + '_H')

    cp.plot_prediction(flattrace,
                       D['name_list'],
                       D['Tt_Cp'],
                       D['At_Cp'],
                       D['It_Cp'],
コード例 #4
0
ファイル: errorbars_yma.py プロジェクト: npaulson/UnaryBayes
    msg = "model evidence: " + str(D['lnZ']) + \
          " +/- " + str(D['dlnZ'])
    cc.WP(msg, D['wrt_file'])

    cp.plot_hist(flattrace,
                 D['pname'],
                 D['pname_plt'],
                 param_true=D['param_true'],
                 pltname=D['outname'])

    cc.coef_summary(flattrace, D['pname'], D['outname'])

    cp.plot_cov(flattrace,
                D['pname_plt'],
                param_true=D['param_true'],
                figsize=[5.5, 5.5],
                pltname=D['outname'],
                sciform=True)

    # rescale the data errors by the means of the hyperparameters
    hyp_m = np.mean(flattrace[:, D['order'] + 1:], 0)
    hyp_m_V = np.zeros(D['Et'].shape)
    for ii in range(len(hyp_m)):
        hyp_m_V[D['It'] == ii] = hyp_m[ii]

    cp.plot_prediction(flattrace,
                       D['name_list'],
                       D['Tt'],
                       D['At'],
                       D['It'],
                       feval,