7. Vectorizing the data
• Everything needs to be numeric
• Strings converted to several inputs as
yes/no (1/0)
• i.e. Device Manufacturer
– “Apple” would be a discrete input
• Watch out for input explosion (UA String)
8. Balancing the data
• 3% Conversion Rate
• 97% Accurate by always guessing no
• Subsample the data for 50/50 mix
10. Smoothing the data
• ML works best on normally distributed data
scaler = StandardScaler()
x_train = scaler.fit_transform(x_train)
x_val = scaler.transform(x_val)
11. Input/Output Relationships
• SSL highly correlated with Conversions
• Long sessions highly correlated with not
bouncing
• Remove correlated features from training
12. Training Deep Learning
model = Sequential()
model.add(...)
model.compile(optimizer='adagrad',
loss='binary_crossentropy',
metrics=["accuracy"])
model.fit(x_train,
y_train,
nb_epoch=EPOCH_COUNT,
batch_size=32,
validation_data=(x_val, y_val),
verbose=2,
shuffle=True)