Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine...
Transcript of Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine...
![Page 1: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/1.jpg)
1© 2015 The MathWorks, Inc.
Machine Learning Made Easy
Shashank Prasanna
Product Marketing Manager,
Statistics and Machine Learning
![Page 2: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/2.jpg)
2
Machine Learning
– What is Machine Learning and why do we need it?
– Common challenges in Machine Learning
Example 1: Human activity learning using mobile phone data
– Learning from sensor data
Example 2: Real-time car identification using images
– Learning from images
Summary & Key Takeaways
Agenda
![Page 3: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/3.jpg)
3
Machine Learning is Everywhere
Image Recognition
Speech Recognition
Stock Prediction
Medical Diagnosis
Data Analytics
Robotics
and more…
[TBD]
![Page 4: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/4.jpg)
4
Machine Learning
Machine learning uses data and produces a program to perform a task
Standard Approach Machine Learning Approach
𝑚𝑜𝑑𝑒𝑙 = <𝑴𝒂𝒄𝒉𝒊𝒏𝒆𝑳𝒆𝒂𝒓𝒏𝒊𝒏𝒈𝑨𝒍𝒈𝒐𝒓𝒊𝒕𝒉𝒎
>(𝑠𝑒𝑛𝑠𝑜𝑟_𝑑𝑎𝑡𝑎, 𝑎𝑐𝑡𝑖𝑣𝑖𝑡𝑦)
Computer
Program
Machine
Learning
𝑚𝑜𝑑𝑒𝑙: Inputs → OutputsHand Written Program Formula or Equation
If X_acc > 0.5
then “SITTING”
If Y_acc < 4 and Z_acc > 5
then “STANDING”
…
𝑌𝑎𝑐𝑡𝑖𝑣𝑖𝑡𝑦= 𝛽1𝑋𝑎𝑐𝑐 + 𝛽2𝑌𝑎𝑐𝑐+ 𝛽3𝑍𝑎𝑐𝑐 +
…
Task: Human Activity Detection
![Page 5: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/5.jpg)
5
Example: Human Activity Learning Using Mobile Phone Data
Machine
Learning
Data:
3-axial Accelerometer data
3-axial Gyroscope data
![Page 6: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/6.jpg)
6
“essentially, all models are wrong,
but some are useful”
– George Box
![Page 7: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/7.jpg)
7
Challenges in Machine LearningHard to get started
Steps Challenge
Access, explore and analyze
dataData diversity
Numeric, Images, Signals, Text – not always tabular
Preprocess dataLack of domain tools
Filtering and feature extraction
Feature selection and transformation
Train modelsTime consuming
Train several models to find the “best”
Assess model performanceAvoid pitfalls
Over Fitting
Speed-Accuracy-Complexity tradeoffs
Iterate
![Page 8: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/8.jpg)
8
PREDICTIONMODEL
Machine Learning Workflow for Example 1
Train: Iterate till you find the best model
Predict: Integrate trained models into applications
MODELSUPERVISED
LEARNING
CLASSIFICATION
REGRESSION
PREPROCESS
DATA
SUMMARY
STATISTICS
PCAFILTERS
CLUSTER
ANALYSIS
LOAD
DATA
PREPROCESS
DATA
SUMMARY
STATISTICS
PCAFILTERS
CLUSTER
ANALYSIS
TEST
DATA
![Page 9: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/9.jpg)
9
Machine Learning
– What is Machine Learning and why do we need it?
– Common challenges in Machine Learning
Example 1: Human activity learning using mobile phone data
– Learning from sensor data
Example 2: Real-time car identification using images
– Learning from images
Summary & Key Takeaways
Agenda
![Page 10: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/10.jpg)
10
Example 1: Human Activity Learning Using Mobile Phone Data
Objective: Train a classifier to classify
human activity from sensor data
Data:
Approach:
– Extract features from raw sensor signals
– Train and compare classifiers
– Test results on new sensor data
Predictors 3-axial Accelerometer and
Gyroscope data
Response Activity:
![Page 11: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/11.jpg)
11
PREDICTIONMODEL
Machine Learning Workflow for Example 1
Train: Iterate till you find the best model
Predict: Integrate trained models into applications
MODELSUPERVISED
LEARNING
CLASSIFICATION
REGRESSION
PREPROCESS
DATA
SUMMARY
STATISTICS
PCAFILTERS
CLUSTER
ANALYSIS
LOAD
DATA
PREPROCESS
DATA
SUMMARY
STATISTICS
PCAFILTERS
CLUSTER
ANALYSIS
TEST
DATA
1. Mean
2. Standard
deviation
3. PCA
Classification
Learner
1. Mean
2. Standard
deviation
3. PCA
![Page 12: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/12.jpg)
12
Machine Learning
– What is Machine Learning and why do we need it?
– Common challenges in Machine Learning
Example 1: Human activity learning using mobile phone data
– Learning from sensor data
Example 2: Real-time car identification using images
– Learning from images
Summary & Key Takeaways
Agenda
![Page 13: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/13.jpg)
13
Example 2: Real-time Car Identification Using Images
Objective: Train a classifier to identify car
type from a webcam video
Data:
Approach:
– Extract features using Bag-of-words
– Train and compare classifiers
– Classify streaming video from a webcam
Predictors Several images of cars:
Response NIGEL, LIGHTNING, SANDDUNE, MATER
![Page 14: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/14.jpg)
14
PREDICTIONMODEL
Machine Learning Workflow for Example 2
Train: Iterate till you find the best model
Predict: Integrate trained models into applications
MODELSUPERVISED
LEARNING
CLASSIFICATION
REGRESSION
PREPROCESS
DATA
SUMMARY
STATISTICS
PCAFILTERS
CLUSTER
ANALYSIS
LOAD
DATA
PREPROCESS
DATA
SUMMARY
STATISTICS
PCAFILTERS
CLUSTER
ANALYSIS
WEBCAM
1. Build Bag-of-
features
2. Encode images
as new features
Classification
Learner
Encode images as
new features
![Page 15: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/15.jpg)
15
Machine Learning
– What is Machine Learning and why do we need it?
– Common challenges in Machine Learning
Example 1: Human activity learning using mobile phone data
– Learning from sensor data
Example 2: Real-time car identification using images
– Learning from images
Summary & Key Takeaways
Agenda
![Page 16: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/16.jpg)
16
MATLAB Strengths for Machine Learning
Challenge Solution
Data diversityExtensive data support
Import and work with signal, images, financial,
Textual, geospatial, and several others formats
Lack of domain toolsHigh-quality libraries
Industry-standard algorithms for Finance, Statistics, Signal,
Image processing & more
Time consuming Interactive, app-driven workflows
Focus on machine learning, not programing
Avoid pitfallsOver Fitting,
Speed-Accuracy-Complexity
Integrated best practicesModel validation tools built into app
Rich documentation with step by step guidance
Flexible architecture for customized workflowsComplete machine learning platform
![Page 17: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/17.jpg)
17
Consider Machine Learning when:
– Hand written rules and equations are too complex
Face recognition, speech recognition, recognizing patterns
– Rules of a task are constantly changing
Fraud detection from transactions, anomaly in sensor data
– Nature of the data changes and the program needs to adapt
Automated trading, energy demand forecasting, predicting shopping trends
MATLAB for Machine Learning Email me if you have further questions
Key Takeaways
![Page 18: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/18.jpg)
18
Additional Resources
Documentation: mathworks.com/machine-learning
![Page 19: Machine Learning Made Easy · Shashank Prasanna Product Marketing Manager, Statistics and Machine Learning shashank.prasanna@mathworks.com. 2](https://reader033.fdocuments.net/reader033/viewer/2022051907/5ff9878829715211333d22fd/html5/thumbnails/19.jpg)
19
Q & A