def report(niter=50, **kwargs):

    condition_report = reports.reports['test_marginalize']
    runs = reports.collect_multiple_runs(condition_report['test'],
                                         condition_report['columns'], niter,
                                         reports.summarize_all, **kwargs)

    fig = reports.pivot_plot_plus_naive(runs)
    #fig = reports.pivot_plot_2in1(runs,color='b', label='marginalized subgradient')
    fig.suptitle('Randomized Lasso marginalized subgradient')
    fig.savefig('marginalized_subgrad_pivots.pdf')
def report(niter=200, **kwargs):

    kwargs = {'s': 0, 'n': 200, 'p': 20, 'snr': 7, 'loss': 'gaussian', 'randomizer': 'gaussian'}
    split_report = reports.reports['test_approximate_ci']
    screened_results = reports.collect_multiple_runs(split_report['test'],
                                                     split_report['columns'],
                                                     niter,
                                                     reports.summarize_all,
                                                     **kwargs)

    fig = reports.pivot_plot_plus_naive(screened_results)
    fig.savefig('approx_pivots_threshold.pdf')
def report(niter=50, **kwargs):
    kwargs = {
        's': 0,
        'n': 600,
        'p': 100,
        'signal': 7,
        'bootstrap': False,
        'randomizer': 'gaussian',
        'loss': 'gaussian',
        'intervals': 'old'
    }
    intervals_report = reports.reports['test_intervals']
    runs = reports.collect_multiple_runs(intervals_report['test'],
                                         intervals_report['columns'], niter,
                                         reports.summarize_all, **kwargs)
    fig = reports.pivot_plot_plus_naive(runs)
    fig.suptitle('Selective vs naive p-values after group Lasso')
    fig.savefig('Group_lasso.pdf')
Пример #4
0
def report(niter=1, **kwargs):

    condition_report = reports.reports['test_without_screening']
    runs = reports.collect_multiple_runs(condition_report['test'],
                                         condition_report['columns'], niter,
                                         reports.summarize_all, **kwargs)

    pkl_label = ''.join(["test_without_screening.pkl", "_", kwargs['loss'],"_",\
                         kwargs['randomizer'], ".pkl"])
    pdf_label = ''.join(["test_without_screening.pkl", "_", kwargs['loss'], "_", \
                         kwargs['randomizer'], ".pdf"])
    runs.to_pickle(pkl_label)
    runs_read = pd.read_pickle(pkl_label)

    fig = reports.pivot_plot_plus_naive(runs_read,
                                        color='b',
                                        label='no screening')

    fig.suptitle('Testing without screening', fontsize=20)
    fig.savefig(pdf_label)
Пример #5
0
def report(niter=50, **kwargs):
    np.random.seed(500)
    intervals_report = reports.reports['test_cv']
    runs = reports.collect_multiple_runs(intervals_report['test'],
                                         intervals_report['columns'], niter,
                                         reports.summarize_all, **kwargs)

    pkl_label = ''.join([
        kwargs['loss'], "_",
        str(kwargs['condition_on_CVR']), "_", "test_cv.pkl"
    ])
    pdf_label = ''.join([
        kwargs['loss'], "_",
        str(kwargs['condition_on_CVR']), "_", "test_cv.pdf"
    ])
    runs.to_pickle(pkl_label)
    runs_read = pd.read_pickle(pkl_label)

    fig = reports.pivot_plot_plus_naive(runs_read)
    fig.suptitle("CV pivots", fontsize=20)
    fig.savefig(pdf_label)
Пример #6
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')