299e5f43b77ba545c07e0555d8c92cc8decebdc7,pymc3/plots/forestplot.py,,_make_rhat_plot,#Any#Any#Any#Any#Any#Any#,26

Before Change


    if varnames is None:
        varnames = get_default_varnames(trace.varnames, include_transformed)

    R = gelman_rubin(trace)
    R = {v: R[v] for v in varnames}

    ax.set_title(title)

    // Set x range
    ax.set_xlim(0.9, 2.1)

    // X axis labels
    ax.set_xticks((1.0, 1.5, 2.0), ("1", "1.5", "2+"))
    ax.set_yticks([-(l + 1) for l in range(len(labels))], "")

    i = 1
    for varname in varnames:
        chain = trace.chains[0]
        value = trace.get_values(varname, chains=[chain])[0]
        k = np.size(value)

        if k > 1:
            ax.plot([min(r, 2) for r in R[varname]],
                    [-(j + i) for j in range(k)], "bo", markersize=4)
        else:
            ax.plot(min(R[varname], 2), -i, "bo", markersize=4)

After Change


        chain = trace.chains[0]
        value = trace.get_values(varname, chains=[chain])[0]
        k = np.size(value)
        R = gelman_rubin(trace, varnames=[varname])

        if k > 1:
            Rval = dict2pd(R, "rhat").values
            ax.plot([min(r, 2) for r in Rval],
                    [-(j + i) for j in range(k)], "bo", markersize=4)
        else:
            ax.plot(min(R[varname], 2), -i, "bo", markersize=4)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: pymc-devs/pymc3
Commit Name: 299e5f43b77ba545c07e0555d8c92cc8decebdc7
Time: 2017-11-22
Author: junpeng.lao@unifr.ch
File Name: pymc3/plots/forestplot.py
Class Name:
Method Name: _make_rhat_plot


Project Name: keras-team/autokeras
Commit Name: 5b8864d1863ac0474db8b657f023341686f4b1fb
Time: 2020-09-24
Author: jhfjhfj1@gmail.com
File Name: benchmark/imdb.py
Class Name:
Method Name: imdb_raw