Introduction to Machine Learning and Deep Learning
Dr Dhruv Chandel
Education Team, MathWorks
dchandel@mathworks.com
© 2017 The MathWorks, Inc.
1
There are two ways to get a computer to do what you want
Traditional Programming
Data
COMPUTER
Output
Program
2
There are two ways to get a computer to do what you want
Machine Learning
Data
COMPUTER
Program
Output
3
There are two ways to get a computer to do what you want
Machine Learning
Data
COMPUTER
Model
Output
Artificial Machine Deep
Intelligence Learning Learning
4
Machine Learning is Everywhere
Solution is too complex for hand written rules or equations
learn complex non-
linear relationships
Speech Recognition Object Recognition Engine Health Monitoring
Solution needs to adapt with changing data
update as more data
becomes available
Weather Forecasting Energy Load Forecasting Stock Market Prediction
Solution needs to scale
learn efficiently from
very large data sets
IoT Analytics Taxi Availability Airline Flight Delays 5
Human Activity Recognition Walking
Climbing
• Accelerometer
• Heartbeat
• GPS Data
Machine
Learning Sitting
Get signal frequency,
magnitude
Standing
Sleeping
6
Types of Machine Learning
Type of Learning Categories of Algorithms
Objective:
Regression
Easy and accurate computation of day-
Supervised
ahead system load forecast
Learning
Develop predictive Classification
model based on both
Machine input and output data
Learning
7
Types of Machine Learning
Type of Learning Categories of Algorithms
Objective:
Regression Train a classifier to classify human
Supervised activity from sensor data
Learning
Classification
Data:
Develop predictive
model based on both
Machine input and output data
Learning Inputs 3-axial Accelerometer
3-axial Gyroscope
Outputs
8
Types of Machine Learning
Type of Learning Categories of Algorithms
Objective:
Regression
Given data for engine speed and
Supervised
Learning vehicle speed, identify clusters
Develop predictive Classification
model based on both
Machine input and output data
Learning
Unsupervised
Clustering
Learning
Discover an internal
representation from
input data only
9
Machine Learning Workflow
Access and Explore Develop Predictive Integrate Analytics with
Preprocess Data
Data Models Systems
Files Noisy Data Model Creation Desktop Apps
Databases Data Transformation Parameter Enterprise Systems
Optimization
Sensors Feature Extraction Model Validation Embedded Devices
• Data Diversity • Data specific processing • Many different models • Different end users
• Data clean up • Feature Extraction • Model tuning • Different target platforms
• Working with big data • Feature Selection • Computationally intensive • Different Interfaces
10
Hands-on Exercises – Machine Learning
Exercise 1: Predicting Fuel Economy using Exercise 2: Human Activity Learning
regression learner App using Smartphones
Machine
Learning
Find all Live Scripts here 11
Hands-on Exercises – Machine Learning
Exercise 3 – Feature Engineering for human activity Exercise 4 – Clustering Human Activity
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-0.1 0 0.1 0.2 0.3 0.4 0.5 0.6
Find all Live Scripts here 12
Different Types of Machine Learning
Type of Learning Categories of Algorithms
Unsupervised • Discover a good internal representation
Clustering
Learning • Learn a low dimensional representation
Group and interpret
data based only
Machine on input data
Learning
• Output is a choice between classes
Classification
• (True, False) (Red, Blue, Green)
Supervised
Learning
• Output is a real number (temperature,
Develop predictive Regression
stock prices).
model based on both
input and output data
13
Different Types of Machine Learning
Type of Learning Categories of Algorithms
• k-means, k-medoids, Hierarchical, Gaussian
Unsupervised
Clustering Mixture Models, Nearest Neighbors, Hidden
Learning
Markov Models
Group and interpret
data based only
Machine on input data
Learning
• Decision Trees, Nearest Neighbor, Support
Classification Vector Machines, Ensemble Methods,
Discriminant Analysis
Supervised
Learning
• Linear Regression, Generalized Linear Regression,
Develop predictive Regression Nonlinear Regression, Mixed-Effects, Stepwise,
model based on both Gaussian Process Regression
input and output data
14
Machine Learning Workflow
Train: Iterate till you find the best model
LOAD PREPROCESS SUPERVISED MODEL
DATA DATA LEARNING
FILTERS PCA CLASSIFICATION
SUMMARY CLUSTER REGRESSION
STATISTICS ANALYSIS
Predict: Integrate trained models into applications
NEW PREDICTION
DATA
15
Machine Learning Workflow
Train: Iterate until you find the best model
LOAD PREPROCESS SUPERVISED MODEL
DATA DATA LEARNING
1. Mean
Standard PCA
2.FILTERS CLASSIFICATION
Classification
deviation Learner
SUMMARY CLUSTER
3. PCA
STATISTICS ANALYSIS
REGRESSION
Predict: Integrate trained models into applications
TEST PREPROCESS MODEL PREDICTION
DATA DATA
1. Mean
2. FILTERS
Standard PCA
deviation
SUMMARY CLUSTER
3.STATISTICS
PCA ANALYSIS
16
“Essentially, all models are wrong, but
some are useful”
– George Box
Challenge:
Find useful models for your data.
17
Thank you!
▪ To learn more, visit:
www.matlabacademy.mathworks.com
▪ For questions or requests for
2-3 hour long
collaboration on research/curriculum free courses
development, please reach out to me:
Dr Dhruv Chandel
Education Team, MathWorks
dchandel@mathworks.com 14-20 hour long
courses
(included in IIT
Campus-Wide
License)
18