def get_sample_source(prob_label):
    """Return a SampleSource corresponding to the problem label.
    """
    # map: prob_label -> sample_source
    prob2ss = {
        'SSBlobs': data.SSBlobs(),
        'gmd_d100': data.SSGaussMeanDiff(d=100, my=1.0),
        'gvd_d50': data.SSGaussVarDiff(d=50),
        'gvd_d100': data.SSGaussVarDiff(d=100),
        # The null is true
        'sg_d50': data.SSSameGauss(d=50)
    }
    if prob_label not in prob2ss:
        raise ValueError('Unknown problem label. Need to be one of %s' %
                         str(prob2ss.keys()))
    return prob2ss[prob_label]
Example #2
0
def get_sample_source(prob_label):
    """Return a SampleSource representing the problem, and sample_sizes to try
    in a 2-tuple"""

    # map: prob_label -> (sample_source, sample_sizes)
    sample_sizes = [i * 2000 for i in range(1, 5 + 1)]
    #sample_sizes = [i*1000 for i in range(1, 3+1)]
    prob2ss = {
        'SSBlobs': (data.SSBlobs(), sample_sizes),
        'gmd_d100': (data.SSGaussMeanDiff(d=100, my=1.0), sample_sizes),
        'gvd_d50': (data.SSGaussVarDiff(d=50), sample_sizes),
        # The null is true
        'sg_d50': (data.SSSameGauss(d=50), sample_sizes),
        'sg_d5': (data.SSSameGauss(d=5), sample_sizes)
    }
    if prob_label not in prob2ss:
        raise ValueError('Unknown problem label. Need to be one of %s' %
                         str(list(prob2ss.keys())))
    return prob2ss[prob_label]