Introduction to deep learning

Predicting CTR with Machine Learning in Python

Kevin Huo

Instructor

Perceptrons

Example of structure of a perceptron

  • Input features are standardized
  • Inputs get summed through weights
  • Output goes through activation function
  • Unit step function to convert output into predicted class
Predicting CTR with Machine Learning in Python

Hidden layers and activation functions

Example of hidden layers

Example of activation functions

Predicting CTR with Machine Learning in Python

Implementation

clf = MLPClassifier()
print(clf)
MLPClassifier(activation='relu', 
              alpha=0.0001,

... hidden_layer_sizes=(100,),
learning_rate = 'constant',
... max_iter=200, ...)
Predicting CTR with Machine Learning in Python

Other considerations

  • Standardization is important before usage
    • X = StandardScaler().fit_transform(X)
  • Very large networks with many millions of parameters
    • Feature matrices are often "sparse"
  • Better performance with more data
    • However, downside is less transparency and longer compute time
Predicting CTR with Machine Learning in Python

Let's practice!

Predicting CTR with Machine Learning in Python

Preparing Video For Download...