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

    # these are all our null tests
    fn_names = ['test_gaussian_pvals',
                'test_logistic_pvals',
                'test_data_carving_gaussian',
                'test_data_carving_sqrt_lasso',
                'test_data_carving_logistic',
                'test_data_carving_poisson',
                'test_data_carving_coxph'
                ]

    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)
    fig.savefig('algorithms_pvalues.pdf') 

    fig = reports.split_pvalue_plot(dfs)
    fig.savefig('algorithms_split_pvalues.pdf') 
def report(niter=50, **kwargs):

    _report = goodness_of_fit_report = reports.reports['test_goodness_of_fit']
    runs = reports.collect_multiple_runs(_report['test'], _report['columns'],
                                         niter, reports.summarize_all,
                                         **kwargs)
    fig = reports.pvalue_plot(runs)
    fig.savefig('sqrtlasso_goodness_of_fit.pdf')
def report(niter=50, **kwargs):

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

    fig = reports.pvalue_plot(runs)
    fig.savefig('conditional_pivots.pdf')
def report(niter=50, **kwargs):

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

    fig = reports.pvalue_plot(runs)
    fig.savefig(
        'fixedX_pivots.pdf')  # will have both bootstrap and CLT on plot
Exemple #5
0
def report(niter=100, design="random", **kwargs):

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

    intervals_report = reports.reports['test_cv_corrected_nonrandomized_lasso']
    screened_results = reports.collect_multiple_runs(
        intervals_report['test'], intervals_report['columns'], niter,
        reports.summarize_all, **kwargs)
    screened_results.to_pickle("cv_corrected_nonrandomized_lasso.pkl")
    results = pd.read_pickle("cv_corrected_nonrandomized_lasso.pkl")

    fig = reports.pvalue_plot(results, label='CV corrected')
    fig.suptitle("CV corrected norandomized Lasso pivots", fontsize=20)
    fig.savefig('cv_corrected_nonrandomized_lasso_pivots.pdf')
def report(niter=50, **kwargs):
    # these are all our null tests
    fn_names = ['test_threshold_score']

    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.savefig(
        'threshold_pvalues.pdf')  # will have both bootstrap and CLT on plot
def report(niter=50, **kwargs):
    # these are all our null tests
    fn_names = ['test_parametric_covariance_small',
                'test_multiple_queries_small',
                'test_multiple_queries_individual_coeff_small']

    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.savefig('randomization_to_zero_pvalues.pdf') # will have both bootstrap and CLT on plot
Exemple #8
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