def report(niter=50, design="random", **kwargs):

    if design == "fixed":
        X, _, _, _, _ = gaussian_instance(**kwargs)
        kwargs.update({'X': X})

    kwargs.update({'cross_validation': True, 'condition_on_CVR': False})
    intervals_report = reports.reports['test_naive']
    screened_results = reports.collect_multiple_runs(
        intervals_report['test'], intervals_report['columns'], niter,
        reports.summarize_all, **kwargs)

    screened_results.to_pickle("naive.pkl")
    results = pd.read_pickle("naive.pkl")

    fig = reports.naive_pvalue_plot(results)
    #fig = reports.pvalue_plot(results, label="Naive p-values")
    fig.suptitle("Naive p-values", fontsize=20)
    fig.savefig('naive_pvalues.pdf')
예제 #2
0
def report(niter=50):

    # these are all our null tests
    fn_names = [
        'test_overall_null_two_queries',
        'test_one_inactive_coordinate_handcoded'
    ]

    dfs = []
    for fn in fn_names:
        fn = reports.reports[fn]
        dfs.append(
            reports.collect_multiple_runs(fn['test'], fn['columns'], niter,
                                          reports.summarize_all))
    dfs = pd.concat(dfs)

    fig = reports.pvalue_plot(dfs, colors=['r', 'g'])
    fig = reports.naive_pvalue_plot(dfs, fig=fig, colors=['k', 'b'])

    fig.savefig('Mest_pvalues.pdf')  # will have both bootstrap and CLT on plot
예제 #3
0
def report(niter=100, design="random", **kwargs):

    if design == "fixed":
        X, _, _, _, _ = gaussian_instance(**kwargs)
        kwargs.update({'X': X})

    intervals_report = reports.reports['test_lee_et_al']
    screened_results = reports.collect_multiple_runs(
        intervals_report['test'], intervals_report['columns'], niter,
        reports.summarize_all, **kwargs)

    screened_results.to_pickle("lee_et_al_pivots.pkl")
    results = pd.read_pickle("lee_et_al_pivots.pkl")

    #naive plus lee et al.
    fig = reports.pivot_plot_plus_naive(results)
    fig.suptitle("Lee et al. and naive p-values", fontsize=20)
    fig.savefig('lee_et_al_pivots.pdf')

    # naive only
    fig1 = reports.naive_pvalue_plot(results)
    fig1.suptitle("Naive p-values", fontsize=20)
    fig1.savefig('naive_pvalues.pdf')