Professional Documents
Culture Documents
An Introduction To Machine Learning and How To Teach Machines To See
An Introduction To Machine Learning and How To Teach Machines To See
© 2019 Tryolabs
Who are we?
© 2019 Tryolabs 2
Outline
Machine Learning
• Types of Machine Learning Problems
• Steps to solve a Machine Learning Problem
Deep Learning
• Artificial Neural Networks
Image Classification
• Convolutional Neural Networks
© 2019 Tryolabs 3
What is a Cat?
© 2019 Tryolabs
What is a Cat?
© 2019 Tryolabs 5
What is a Cat?
© 2019 Tryolabs 6
Introduction to
Machine Learning
© 2019 Tryolabs
Introduction to Machine Learning
What is Machine Learning?
The subfield of computer science that “gives computers the ability to learn
without being explicitly programmed”.
(Arthur Samuel, 1959)
A computer program is said to learn from experience E with respect to
some class of tasks T and performance measure P if its performance at
tasks in T, as measured by P, improves with experience E.”
(Tom Mitchell, 1997)
© 2019 Tryolabs 8
Introduction to Machine Learning
The Big Data Era
Data Devices Services
Cloud Computing:
Everyone has a • Online storage
Data already available computer fully packed
everywhere • Infrastructure as a
with sensors: Service
Low storage costs: • GPS
everyone has several • Cameras User applications:
GBs for “free” • Microphones • YouTube
• Gmail
Hardware more • Facebook
Permanently connected
powerful and cheaper • Twitter
to Internet
than ever before
© 2019 Tryolabs 9
Introduction to Machine Learning
Types of Machine Learning Problems
Supervised
Unsupervised
Reinforcement
© 2019 Tryolabs 10
Introduction to Machine Learning
Types of Machine Learning Problems
© 2019 Tryolabs 11
Introduction to Machine Learning
Types of Machine Learning Problems
Supervised Classification
Output is a discrete
variable (e.g., cat/dog)
Unsupervised
Regression
Output is continuous
Reinforcement (e.g., price, temperature)
© 2019 Tryolabs 12
Introduction to Machine Learning
Types of Machine Learning Problems
Supervised
© 2019 Tryolabs 13
Introduction to Machine Learning
Types of Machine Learning Problems
Unsupervised
Reinforcement
© 2019 Tryolabs 14
Introduction to Machine Learning
Types of Machine Learning Problems
Reinforcement
© 2019 Tryolabs 15
Introduction to Machine Learning
Steps to Solve a Machine Learning Problem
© 2019 Tryolabs 16
Introduction to Machine Learning
Data Gathering
© 2019 Tryolabs 17
Introduction to Machine Learning
Data Preprocessing
© 2019 Tryolabs 18
Introduction to Machine Learning
Feature Engineering
What is a feature?
Buy ch34p drugs
A feature is an individual measurable from the ph4rm4cy
property of a phenomenon being observed now :) :) :)
Our inputs are represented by a set of features.
Feature
To classify spam email, features could be: engineering
• Number of words that have been ch4ng3d
like this.
• Language of the email (0=English, (2, 0, 3)
1=Spanish)
• Number of emojis
© 2019 Tryolabs 19
Introduction to Machine Learning
Feature Engineering
Extract more information from existing data, not adding “new” data per-se
• Making it more useful
• With good features, most algorithms can learn faster
It can be an art
• Requires thought and knowledge of the data
Two steps:
• Variable transformation (e.g., dates into weekdays, normalizing)
• Feature creation (e.g., n-grams for texts, if word is capitalized to
detect names, etc.)
© 2019 Tryolabs 20
Introduction to Machine Learning
Algorithm Selection & Training
Supervised Unsupervised
• Linear classifier • PCA
• Naive Bayes • t-SNE
• Support Vector Machines (SVM) • k-means
• Decision Tree • DBSCAN
• Random Forests Reinforcement
• k-Nearest Neighbors • SARSA–λ
• Neural Networks (Deep learning) • Q-Learning
© 2019 Tryolabs 21
Introduction to Machine Learning
Algorithm Selection & Training
Predict Adjust
© 2019 Tryolabs 22
Introduction to Machine Learning
Making Predictions
Training Phase
Labels
Machine
Learning
Feature model
Samples extraction Features
Prediction Phase
© 2019 Tryolabs 23
Introduction to Machine Learning
Summary
© 2019 Tryolabs
Deep Learning
Artificial Neural Networks
© 2019 Tryolabs 26
Deep Learning
Loss function
© 2019 Tryolabs 27
Deep Learning
The Rise, Fall, Rise, Fall and Rise of Neural Networks
© 2019 Tryolabs 28
Deep Learning
The Rise, Fall, Rise, Fall and Rise of Neural Networks
© 2019 Tryolabs 29
Image Classification with
Deep Neural Networks
© 2019 Tryolabs
Image Classification with Deep Neural Networks
© 2019 Tryolabs 31
Image Classification with Deep Neural Networks
∑
⊙ =
Kernel
Input Output
© 2019 Tryolabs 32
Image Classification with Deep Neural Networks
∑
⊙ =
Kernel
Input Output
© 2019 Tryolabs 33
Image Classification with Deep Neural Networks
∑
⊙ =
Kernel
Input Output
© 2019 Tryolabs 34
Image Classification with Deep Neural Networks
∑
⊙ =
Kernel
Input Output
© 2019 Tryolabs 35
Image Classification with Deep Neural Networks
The Convolution Operation
Kernel
© 2019 Tryolabs 36
Image Classification with Deep Neural Networks
The Convolution Operation
© 2019 Tryolabs 37
Image Classification with Deep Neural Networks
The Convolution Operation
Traditional ML
Input Feature Features Trained Output
extraction classifier
Deep Learning
Input Trained Output
classifier
© 2019 Tryolabs 38
Image Classification with Deep Neural Networks
Non-linear Activation Functions
© 2019 Tryolabs 39
Image Classification with Deep Neural Networks
Non-linear Activation Functions
ReLU
© 2019 Tryolabs 40
Image Classification with Deep Neural Networks
The Pooling Operation
12 20 30 0
34 70 37 4 112 37
112 100 25 12
© 2019 Tryolabs 41
Image Classification with Deep Neural Networks
Putting all together
Input
Conv Layer
Non-Linear Function
Fully Connected Layers
Pooling
Conv Layer
Non-Linear Function
Pooling
…
Conv Layer
Non-Linear Function
Flatten
© 2019 Tryolabs 42
Image Classification with Deep Neural Networks
Training Convolutional Neural Networks
Convolutional
Prediction: Dog
Network
Loss
Label: Cat Function
© 2019 Tryolabs 43
Image Classification with Deep Neural Networks
Training Convolutional Neural Networks
Convolutional
Prediction: Cat
Network
Loss
Label: Cat Function
© 2019 Tryolabs 44
Image Classification with Deep Neural Networks
Surpassing Human Performance
© 2019 Tryolabs 45
Deep Learning in the Wild
© 2019 Tryolabs 46
Deep Learning is Here to Stay
© 2019 Tryolabs 47
Conclusions
© 2019 Tryolabs 48
Resource
Our work To Learn More…
Tryolabs Blog Google Machine Learning Crash Course
https://www.tryolabs.com/blog https://developers.google.com/machine-
learning/crash-course/
Luminoth (Computer Vision Toolkit)
https://www.luminoth.ai Stanford course CS229: Machine Learning
https://developers.google.com/machine-
learning/crash-course/
© 2019 Tryolabs 49
Thank you!
© 2019 Tryolabs