Ejemplo n.º 1
0
if EXPERIMENT_MODE:
    for f in ['./viz/visualize.py', './dl/deepae.py', './utils/sampling.py', './utils/sampling.py']:
        %run f

# -- swap with your own.
data = np.load('data-wprime-qcd.npy')
data = data[data['jet_pt'] > 200]

dat = dat[(dat['jet_pt'] > 200) & (dat['jet_pt'] < 500)]
data = dat[np.abs(dat['jet_eta']) < 2]

# -- load and process daa
X_ = np.array([x.ravel() for x in data['image']]).astype('float32')
y_ = data['signal'].astype('float32')

df = WeightedDataset(X_, y_)

buf = df.sample(141417)

n_train = 115000

X, y = buf[0][:n_train], buf[1][:n_train]
X_val, y_val = buf[0][n_train:], buf[1][n_train:]

tau21 = data['tau_21'][df._ix_buf]
mass = data['jet_mass'][df._ix_buf]
pt = data['jet_pt'][df._ix_buf]

train_sample = df._ix_buf[:n_train]
test_sample = df._ix_buf[n_train:]
Ejemplo n.º 2
0
# -- Experiment mode
EXPERIMENT_MODE = False

if EXPERIMENT_MODE:
    for f in ['./viz/visualize.py', './dl/deepae.py', './utils/sampling.py', './utils/sampling.py']:
        %run f

# -- swap with your own.
data = np.load('data-wprime-qcd.npy')
data = data[data['jet_pt'] > 150]

# -- load and process daa
X_ = np.array([x.ravel() for x in data['image']]).astype('float32')
y_ = data['signal'].astype('float32')

df = WeightedDataset(X_, y_)

buf = df.sample(300000)

n_train = 260000

X, y = buf[0][:n_train], buf[1][:n_train]
X_val, y_val = buf[0][n_train:], buf[1][n_train:]

tau21 = data['tau_21'][df._ix_buf]
mass = data['jet_mass'][df._ix_buf]
pt = data['jet_pt'][df._ix_buf]

train_sample = df._ix_buf[:n_train]
test_sample = df._ix_buf[n_train:]