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]
def get_sample_source_list(prob_label): """Return a list of SampleSource's representing the problems, each corresponding to one dimension in the list. """ # map: prob_label -> [sample_source] # dimensions to try dimensions = [5] + [100*i for i in range(1, 5+1)] high_dims = [5] + [300*i for i in range(1, 5+1)] low_dims = [2*d for d in range(1, 7+1)] prob2ss = { 'gmd': [data.SSGaussMeanDiff(d=d, my=1.0) for d in high_dims], 'gvd': [data.SSGaussVarDiff(d=d) for d in dimensions], # The null is true 'sg': [data.SSSameGauss(d=d) for d in high_dims], 'sg_low': [data.SSSameGauss(d=d) for d in low_dims] } if prob_label not in prob2ss: raise ValueError('Unknown problem label. Need to be one of %s'%str(prob2ss.keys()) ) return prob2ss[prob_label]
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]