def setup_sigmod(ndim, volperc): params = [] #for kdim in xrange(1, ndim+1): kdim = ndim for uo in (30, 80): tablename = 'data_%d_%d_1000_0d%d_%duo' % (ndim, kdim, int(100.*volperc), uo) params.append((tablename, (2000, ndim, kdim, volperc, 10, 10, uo, 10))) for tablename, args in params: obox, sbox, schema, pts = gen_points(*args) setup_synth_data(tablename, schema, pts)
def generate_datasets(db, ndim, uo=30, npts=2000): random.seed(0) """ generates the 2/3/4-d datasets and stores them in db: sigmod """ mid_box, high_box, schema, generator = gen_points(npts, ndim, ndim, 0.25, 10, 10, uo, 10) pts = [pt for pt in generator] c_mid, c_high = compute_c_values(pts, mid_box, high_box) # store boundaries tablename = 'data_%d_%d' % (ndim, int(uo)) id = add_config(db, tablename, 2000, ndim, ndim, 0.25, 10, 10, uo, 10, mid_box, high_box, c_high) # save the damn thing save_pts(db, tablename, pts)