SlideShare a Scribd company logo
1 © Hortonworks Inc. 2011–2018. All rights reserved
DWS Washington, D.C. 2019
Robert Hryniewicz
@robhryniewicz
Data Science Crash Course
2 © Hortonworks Inc. 2011–2018. All rights reserved
INTRO TO DATA SCIENCE
3 © Hortonworks Inc. 2011–2018. All rights reserved
The scientific exploration of data to extract meaning or
insight, using statistics and mathematical models with the
end goal of making smarter, quicker decisions.
What is Data Science?
4 © Hortonworks Inc. 2011–2018. All rights reserved
5 © Hortonworks Inc. 2011–2018. All rights reserved
What is Machine Learning? Favorite cocktail party definitions
Machine Learning is programming with data.
Machine Learning is a way to use data to draw meaningful conclusions including
identifying patterns, anomalies and trends that may not be obvious to humans.
Machine learning is math, at scale.
2nd
3rd
Using statistical analysis of data to build
predictive systems without needing to design
or maintain explicit rules.
1st
6 © Hortonworks Inc. 2011–2018. All rights reserved
Examples where Machine Learning can be applied
Healthcare
• Predict diagnosis
• Prioritize screenings
• Reduce re-admittance rates
Financial services
• Fraud Detection/prevention
• Predict underwriting risk
• New account risk screens
Public Sector
• Analyze public sentiment
• Optimize resource allocation
• Law enforcement & security
Retail
• Product recommendation
• Inventory management
• Price optimization
Telco/mobile
• Predict customer churn
• Predict equipment failure
• Customer behavior analysis
Oil & Gas
• Predictive maintenance
• Seismic data management
• Predict well production levels
Insurance
• Risk assessment
• Customer insights/experience
• Finance real time analysis
Life sciences
• Genome sequencing
• Drug development
• Sensor data
7 © Hortonworks Inc. 2011–2018. All rights reserved
What is a ML Model?
• Mathematical formula with a number of parameters that need to be learned from the
data. Fitting a model to the data is a process known as model training.
• E.g. linear regression
• Goal: fit a line y = mx + c to data points
• After model training: y = 2x + 5
Input OutputModel
1, 0, 7, 2, … 7, 5, 19, 9, …
y = 2x + 5
8 © Hortonworks Inc. 2011–2018. All rights reserved
Types of Learning
Supervised Learning Unsupervised Learning
Reinforcement
Learning
9 © Hortonworks Inc. 2011–2018. All rights reserved
Supervised Learning
Input
Input
Input
Input
Input
Input
Input
Output 1
Output n
Use labeled (training)
datasets on to learn the
relationship of given
inputs to outputs.
Once model is trained use
it to predict outputs on
new input data.
Output 2
.
.
.
…
…
10 © Hortonworks Inc. 2011–2018. All rights reserved
Unsupervised Learning
Explore, classify & find
patterns in the input data
without being explicit
about the output.
11 © Hortonworks Inc. 2011–2018. All rights reserved
Reinforcement Learning
Algorithm
Environment
ActionRewardState
Algorithm learns to
maximize rewards it
receives for its actions
(e.g. maximizes points for
investment returns).
Use when you don’t have
lots of training data, you
can’t clearly define ideal
end-state, or the only way
to learn is by interacting
with the environment.
12 © Hortonworks Inc. 2011–2018. All rights reserved
ALGORITHMS
13 © Hortonworks Inc. 2011–2018. All rights reserved
Regression
Classification
Recommender Systems / Collaborative Filtering
Clustering
Dimensionality Reduction
• Logistic Regression
• Support Vector Machines (SVM)
• Random Forest (RF)
• Naïve Bayes
• Linear Regression • Alternating Least Squares (ALS)
• K-Means, LDA
• Principal Component Analysis (PCA)
Deep Learning
• Fully Connected Neural Nets
 Tabular or Recommender Systems
• Convolutional Neural Nets (CNNs)
 Images
• Recurrent Neural Nets (RNNs)
 Natural Language Processing (NLP) / Text
14 © Hortonworks Inc. 2011–2018. All rights reserved
REGRESSION
Predicting a continuous-valued output
Example: Predicting house prices based on number of bedrooms and square footage
Algorithms: Linear Regression
15 © Hortonworks Inc. 2011–2018. All rights reserved
CLASSIFICATION
Identifying to which category an object belongs to
Examples: spam detection, diabetes diagnosis, text labeling
Algorithms:
• Logistic Regression
• Fast training (linear model)
• Classes expressed in probabilities
• Less overfitting [+]
• Less fitting (accuracy) [-]
• Support Vector Machines (SVM)
• “Best” supervised learning algorithm, effective
• State of the art prior to Deep Learning
• More robust to outliers than Log Regression
• Handles non-linearity
• Checkout: blog.statsbot.co/support-vector-machines-tutorial-c1618e635e93
• Random Forest
(ensemble of Decision Trees)
• Fast training
• Handles categorical features
• Does not require feature scaling
• Captures non-linearity and
feature interaction
• i.e. performs feature selection / PCA implicitly
• Naïve Bayes
• Good for text classification
• Assumes independent variables / words
16 © Hortonworks Inc. 2011–2018. All rights reserved
Visual Intro to Decision Trees
• http://www.r2d3.us/visual-intro-to-machine-learning-part-1
CLASSIFICATION
17 © Hortonworks Inc. 2011–2018. All rights reserved
CLUSTERING
Automatic grouping of similar objects into sets (clusters)
Example: market segmentation – auto group customers into different market segments
Algorithms: K-means, LDA
18 © Hortonworks Inc. 2011–2018. All rights reserved
COLLABORATIVE FILTERING
Fill in the missing entries of a user-item association matrix
Applications: Product/movie recommendation
Algorithms: Alternating Least Squares (ALS)
19 © Hortonworks Inc. 2011–2018. All rights reserved
DIMENSIONALITY REDUCTION
Reducing the number of redundant features/variables
Applications:
• Removing noise in images by selecting only
“important” features
• Removing redundant features, e.g. MPH & KPH are
linearly dependent
Algorithms: Principal Component Analysis (PCA)
20 © Hortonworks Inc. 2011–2018. All rights reserved
Deep Learning
20
21 © Hortonworks Inc. 2011–2018. All rights reserved
22 © Hortonworks Inc. 2011–2018. All rights reserved
Simple/shallow vs Deep Neural Net
23 © Hortonworks Inc. 2011–2018. All rights reserved
• Convolutional Neural Nets (CNNs)
• Recurrent Neural Nets (RNNs)
• Long Short-Term Memory (LSTM)
Popular Neural Net Architectures
 Images
 Text / Language (NLP) & Time Series
24 © Hortonworks Inc. 2011–2018. All rights reserved
Number Probability
0 0.03
1 0.01
2 0.04
3 0.08
4 0.05
5 0.08
6 0.07
7 0.02
8 0.54
9 0.08
25 © Hortonworks Inc. 2011–2018. All rights reserved
scs.ryerson.ca/~aharley/vis/conv/flat.html
26 © Hortonworks Inc. 2011–2018. All rights reserved
Quickly Training Deep Learning Models
with Transfer Learning
26
27 © Hortonworks Inc. 2011–2018. All rights reserved
How to Build a Deep Learning Image Recognition System?
African Bush Elephant Indian Elephant Sri Lankan Elephant Borneo Pygmy Elephant
Step 1: Download examples to train the model with
28 © Hortonworks Inc. 2011–2018. All rights reserved
How to Build a Deep Learning Image Recognition System?
Step 2: Augment dataset to enrich training data
 Adds 5-10x more training examples
29 © Hortonworks Inc. 2011–2018. All rights reserved
dawn.cs.stanford.edu/benchmark
Step 3: Checkout DAWNBench then select and download a pre-trained model.
How to Build a Deep Learning Image Recognition System?
30 © Hortonworks Inc. 2011–2018. All rights reserved
Source: https://www.mathworks.com/videos/introduction-to-deep-learning-what-are-convolutional-neural-networks--1489512765771.html
Sample Architecture of a CNN
31 © Hortonworks Inc. 2011–2018. All rights reserved
Source: https://www.mathworks.com/videos/introduction-to-deep-learning-what-are-convolutional-neural-networks--1489512765771.html
Sample Architecture of a CNN
Pretrained
Parameters
Random
Parameters
32 © Hortonworks Inc. 2011–2018. All rights reserved
Step 4: Apply transfer learning to a downloaded model
How to Build a Deep Learning Image Recognition System?
Pretrained Network
(millions of parameters)
Random
ParametersINPUT OUTPUT
Borneo Pygmy
Elephant
Train
Parameters
Step A
Adjust
Parameters
Step B
image
label
33 © Hortonworks Inc. 2011–2018. All rights reserved
Step 5: Save the trained model
How to Build a Deep Learning Image Recognition System?
Pretrained Network
(millions of parameters)
Random
ParametersINPUT OUTPUT
Train
Parameters
Adjust
Parameters
Trained Model (Neural Net)
34 © Hortonworks Inc. 2011–2018. All rights reserved
Step 6: Host a trained model on a server and make it accessible via a web app
How to Build a Deep Learning Image Recognition System?
User uploads
Borneo Pygmy Elephant
Web app returns
35 © Hortonworks Inc. 2011–2018. All rights reserved
DATA SCIENCE JOURNEY
36 © Hortonworks Inc. 2011–2018. All rights reserved
37 © Hortonworks Inc. 2011–2018. All rights reserved
Start by Asking Relevant Questions
• Specific (can you think of a clear answer?)
• Measurable (quantifiable? data driven?)
• Actionable (if you had an answer, could you do something with it?)
• Realistic (can you get an answer with data you have?)
• Timely (answer in reasonable timeframe?)
38 © Hortonworks Inc. 2011–2018. All rights reserved
Data Preparation
1. Data analysis (audit for anomalies/errors)
2. Creating an intuitive workflow (formulate seq. of prep operations)
3. Validation (correctness evaluated against sample representative dataset)
4. Transformation (actual prep process takes place)
5. Backflow of cleaned data (replace original dirty data)
Approx. 80% of Data Analyst’s job is Data Preparation!
Example of multiple values used for U.S. States  California, CA, Cal., Cal
39 © Hortonworks Inc. 2011–2018. All rights reserved
Visualizing
Data
https://www.autodeskresearch.com/publications/samestats
40 © Hortonworks Inc. 2011–2018. All rights reserved
Feature Selection
• Also known as variable or attribute selection
• Why important?
• simplification of models  easier to interpret by researchers/users
• shorter training times
• enhanced generalization by reducing overfitting
• Dimensionality reduction vs feature selection
• Dimensionality reduction: create new combinations of attributes
• Feature selection: include/exclude attributes in data without changing them
Q: Which features should you use to create a predictive model?
41 © Hortonworks Inc. 2011–2018. All rights reserved
Hyperparameters
• Define higher-level model properties, e.g. complexity or learning rate
• Cannot be learned during training  need to be predefined
• Can be decided by
• setting different values
• training different models
• choosing the values that test better
• Hyperparameter examples
• Number of leaves or depth of a tree
• Number of latent factors in a matrix factorization
• Learning rate (in many models)
• Number of hidden layers in a deep neural network
• Number of clusters in a k-means clustering
42 © Hortonworks Inc. 2011–2018. All rights reserved
• Residuals
• residual of an observed value is the difference between
the observed value and the estimated value
• R2 (R Squared) – Coefficient of Determination
• indicates a goodness of fit
• R2 of 1 means regression line perfectly fits data
• RMSE (Root Mean Square Error)
• measure of differences between values predicted by a model and values actually
observed
• good measure of accuracy, but only to compare forecasting errors of different
models (individual variables are scale-dependent)
43 © Hortonworks Inc. 2011–2018. All rights reserved
With that in mind…
• No simple formula for “good questions” only general guidelines
• The right data is better than lots of data
• Understanding relationships matters
44 © Hortonworks Inc. 2011–2018. All rights reserved
Enterprise Data Science @ Scale
Enterprise- Grade
Leverage
enterprise-grade
security,
governance and
operations
Tools
Enhance productivity
by enabling data
scientists to use their
favorite tools,
technologies and
libraries
Deployment
Compress the
time to insight
by deploying
models into
production
faster
Data
Build more
robust models
by using all
the data in the
data lake
45 © Hortonworks Inc. 2011–2018. All rights reserved
Thanks!
Robert Hryniewicz
@robhryniewicz
46 © Hortonworks Inc. 2011–2018. All rights reserved
Easier intro books (less math)
• The Hundred-Page Machine Learning Book by Andriy Burkov
• Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts,
Tools, and Techniques to Build Intelligent Systems by Aurélien Géron
• Deep Learning with Python by Francois Chollet
• Fundamentals of Machine Learning for Predictive Data Analytics:
Algorithms, Worked Examples, and Case Studies by John D. Kelleher, Brian
Mac Namee, Aoife D’Arcy
More thorough books (more math)
• Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville
• Information Theory, Inference and Learning Algorithms 1st Edition by David
J. C. MacKay
Machine Learning Books
47 © Hortonworks Inc. 2011–2018. All rights reserved

More Related Content

PDF
Latent Dirichlet Allocation
ODP
Topic Modeling
PDF
Feature Engineering - Getting most out of data for predictive models
PPT
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
PPTX
Anomaly Detection with GANs
PPTX
DBSCAN : A Clustering Algorithm
PDF
SVD and the Netflix Dataset
PPTX
NLP_KASHK:Evaluating Language Model
Latent Dirichlet Allocation
Topic Modeling
Feature Engineering - Getting most out of data for predictive models
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Anomaly Detection with GANs
DBSCAN : A Clustering Algorithm
SVD and the Netflix Dataset
NLP_KASHK:Evaluating Language Model

What's hot (20)

PPTX
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
PPTX
Recommendation System
PPTX
Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...
PDF
bag-of-words models
PPTX
Tomáš Mikolov - Distributed Representations for NLP
PDF
Transition Based Dependency Parsing
PDF
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
PPTX
Recommendation system
PDF
Natural Language Processing
PPTX
Feature Engineering
PPTX
Data, Text and Web Mining
PDF
Performance Metrics for Machine Learning Algorithms
PDF
Machine Learning in R
PDF
Introduction to object detection
PDF
Information retrieval-systems notes
PPTX
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
PPTX
Normalization 방법
PPTX
Introduction-to-LLM-Developers-Guide.pptx
PPTX
Natural Language Processing
PDF
Machine learning by using python lesson 3 Confusion Matrix By : Professor Lil...
딥 러닝 자연어 처리 학습을 위한 PPT! (Deep Learning for Natural Language Processing)
Recommendation System
Machine Learning vs Deep Learning vs Artificial Intelligence | ML vs DL vs AI...
bag-of-words models
Tomáš Mikolov - Distributed Representations for NLP
Transition Based Dependency Parsing
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
Recommendation system
Natural Language Processing
Feature Engineering
Data, Text and Web Mining
Performance Metrics for Machine Learning Algorithms
Machine Learning in R
Introduction to object detection
Information retrieval-systems notes
Applying Retrieval-Augmented Generation (RAG) to Combat Hallucinations in GenAI
Normalization 방법
Introduction-to-LLM-Developers-Guide.pptx
Natural Language Processing
Machine learning by using python lesson 3 Confusion Matrix By : Professor Lil...
Ad

Similar to Data Science Crash Course (20)

PDF
Data Science Crash Course
PPTX
Data Science Crash Course
PDF
Deep learning 101
PPTX
Overcoming the AI hype — and what enterprises should really focus on
PDF
Data science workshop
PPTX
Machine Learning AND Deep Learning for OpenPOWER
PPTX
Spark-Zeppelin-ML on HWX
PPTX
Enterprise data science at scale
PDF
Data Science Crash Course
PDF
How to develop a data scientist – What business has requested v02
PPTX
Chatbots: Automated Conversational Model using Machine Learning
PDF
Solving Cybersecurity at Scale
PDF
Enterprise Data Science at Scale
PDF
Square Pegs In Round Holes: Rethinking Data Availability in the Age of Automa...
PPTX
Online talent sourcing - a future essentia
PDF
لموعد الإثنين 03 يناير 2022 143 مبادرة #تواصل_تطوير المحاضرة ال 143 من المباد...
PDF
Deep learning with Hortonworks and Apache Spark - Hortonworks technical workshop
PPTX
An introduction to AI in Test Engineering
PDF
Week 12: Cloud AI- DSA 441 Cloud Computing
PPTX
An introduction to Machine Learning with scikit-learn (October 2018)
Data Science Crash Course
Data Science Crash Course
Deep learning 101
Overcoming the AI hype — and what enterprises should really focus on
Data science workshop
Machine Learning AND Deep Learning for OpenPOWER
Spark-Zeppelin-ML on HWX
Enterprise data science at scale
Data Science Crash Course
How to develop a data scientist – What business has requested v02
Chatbots: Automated Conversational Model using Machine Learning
Solving Cybersecurity at Scale
Enterprise Data Science at Scale
Square Pegs In Round Holes: Rethinking Data Availability in the Age of Automa...
Online talent sourcing - a future essentia
لموعد الإثنين 03 يناير 2022 143 مبادرة #تواصل_تطوير المحاضرة ال 143 من المباد...
Deep learning with Hortonworks and Apache Spark - Hortonworks technical workshop
An introduction to AI in Test Engineering
Week 12: Cloud AI- DSA 441 Cloud Computing
An introduction to Machine Learning with scikit-learn (October 2018)
Ad

More from DataWorks Summit (20)

PPTX
Floating on a RAFT: HBase Durability with Apache Ratis
PPTX
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
PDF
HBase Tales From the Trenches - Short stories about most common HBase operati...
PPTX
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
PPTX
Managing the Dewey Decimal System
PPTX
Practical NoSQL: Accumulo's dirlist Example
PPTX
HBase Global Indexing to support large-scale data ingestion at Uber
PPTX
Scaling Cloud-Scale Translytics Workloads with Omid and Phoenix
PPTX
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFi
PPTX
Supporting Apache HBase : Troubleshooting and Supportability Improvements
PPTX
Security Framework for Multitenant Architecture
PDF
Presto: Optimizing Performance of SQL-on-Anything Engine
PPTX
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
PPTX
Extending Twitter's Data Platform to Google Cloud
PPTX
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
PPTX
Securing Data in Hybrid on-premise and Cloud Environments using Apache Ranger
PPTX
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
PDF
Computer Vision: Coming to a Store Near You
PPTX
Big Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
PPTX
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...
Floating on a RAFT: HBase Durability with Apache Ratis
Tracking Crime as It Occurs with Apache Phoenix, Apache HBase and Apache NiFi
HBase Tales From the Trenches - Short stories about most common HBase operati...
Optimizing Geospatial Operations with Server-side Programming in HBase and Ac...
Managing the Dewey Decimal System
Practical NoSQL: Accumulo's dirlist Example
HBase Global Indexing to support large-scale data ingestion at Uber
Scaling Cloud-Scale Translytics Workloads with Omid and Phoenix
Building the High Speed Cybersecurity Data Pipeline Using Apache NiFi
Supporting Apache HBase : Troubleshooting and Supportability Improvements
Security Framework for Multitenant Architecture
Presto: Optimizing Performance of SQL-on-Anything Engine
Introducing MlFlow: An Open Source Platform for the Machine Learning Lifecycl...
Extending Twitter's Data Platform to Google Cloud
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
Securing Data in Hybrid on-premise and Cloud Environments using Apache Ranger
Big Data Meets NVM: Accelerating Big Data Processing with Non-Volatile Memory...
Computer Vision: Coming to a Store Near You
Big Data Genomics: Clustering Billions of DNA Sequences with Apache Spark
Transforming and Scaling Large Scale Data Analytics: Moving to a Cloud-based ...

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Cloud computing and distributed systems.
PDF
cuic standard and advanced reporting.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Modernizing your data center with Dell and AMD
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Dropbox Q2 2025 Financial Results & Investor Presentation
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Machine learning based COVID-19 study performance prediction
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Understanding_Digital_Forensics_Presentation.pptx
Cloud computing and distributed systems.
cuic standard and advanced reporting.pdf
The AUB Centre for AI in Media Proposal.docx
Review of recent advances in non-invasive hemoglobin estimation
Modernizing your data center with Dell and AMD
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
Per capita expenditure prediction using model stacking based on satellite ima...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Data Science Crash Course

  • 1. 1 © Hortonworks Inc. 2011–2018. All rights reserved DWS Washington, D.C. 2019 Robert Hryniewicz @robhryniewicz Data Science Crash Course
  • 2. 2 © Hortonworks Inc. 2011–2018. All rights reserved INTRO TO DATA SCIENCE
  • 3. 3 © Hortonworks Inc. 2011–2018. All rights reserved The scientific exploration of data to extract meaning or insight, using statistics and mathematical models with the end goal of making smarter, quicker decisions. What is Data Science?
  • 4. 4 © Hortonworks Inc. 2011–2018. All rights reserved
  • 5. 5 © Hortonworks Inc. 2011–2018. All rights reserved What is Machine Learning? Favorite cocktail party definitions Machine Learning is programming with data. Machine Learning is a way to use data to draw meaningful conclusions including identifying patterns, anomalies and trends that may not be obvious to humans. Machine learning is math, at scale. 2nd 3rd Using statistical analysis of data to build predictive systems without needing to design or maintain explicit rules. 1st
  • 6. 6 © Hortonworks Inc. 2011–2018. All rights reserved Examples where Machine Learning can be applied Healthcare • Predict diagnosis • Prioritize screenings • Reduce re-admittance rates Financial services • Fraud Detection/prevention • Predict underwriting risk • New account risk screens Public Sector • Analyze public sentiment • Optimize resource allocation • Law enforcement & security Retail • Product recommendation • Inventory management • Price optimization Telco/mobile • Predict customer churn • Predict equipment failure • Customer behavior analysis Oil & Gas • Predictive maintenance • Seismic data management • Predict well production levels Insurance • Risk assessment • Customer insights/experience • Finance real time analysis Life sciences • Genome sequencing • Drug development • Sensor data
  • 7. 7 © Hortonworks Inc. 2011–2018. All rights reserved What is a ML Model? • Mathematical formula with a number of parameters that need to be learned from the data. Fitting a model to the data is a process known as model training. • E.g. linear regression • Goal: fit a line y = mx + c to data points • After model training: y = 2x + 5 Input OutputModel 1, 0, 7, 2, … 7, 5, 19, 9, … y = 2x + 5
  • 8. 8 © Hortonworks Inc. 2011–2018. All rights reserved Types of Learning Supervised Learning Unsupervised Learning Reinforcement Learning
  • 9. 9 © Hortonworks Inc. 2011–2018. All rights reserved Supervised Learning Input Input Input Input Input Input Input Output 1 Output n Use labeled (training) datasets on to learn the relationship of given inputs to outputs. Once model is trained use it to predict outputs on new input data. Output 2 . . . … …
  • 10. 10 © Hortonworks Inc. 2011–2018. All rights reserved Unsupervised Learning Explore, classify & find patterns in the input data without being explicit about the output.
  • 11. 11 © Hortonworks Inc. 2011–2018. All rights reserved Reinforcement Learning Algorithm Environment ActionRewardState Algorithm learns to maximize rewards it receives for its actions (e.g. maximizes points for investment returns). Use when you don’t have lots of training data, you can’t clearly define ideal end-state, or the only way to learn is by interacting with the environment.
  • 12. 12 © Hortonworks Inc. 2011–2018. All rights reserved ALGORITHMS
  • 13. 13 © Hortonworks Inc. 2011–2018. All rights reserved Regression Classification Recommender Systems / Collaborative Filtering Clustering Dimensionality Reduction • Logistic Regression • Support Vector Machines (SVM) • Random Forest (RF) • Naïve Bayes • Linear Regression • Alternating Least Squares (ALS) • K-Means, LDA • Principal Component Analysis (PCA) Deep Learning • Fully Connected Neural Nets  Tabular or Recommender Systems • Convolutional Neural Nets (CNNs)  Images • Recurrent Neural Nets (RNNs)  Natural Language Processing (NLP) / Text
  • 14. 14 © Hortonworks Inc. 2011–2018. All rights reserved REGRESSION Predicting a continuous-valued output Example: Predicting house prices based on number of bedrooms and square footage Algorithms: Linear Regression
  • 15. 15 © Hortonworks Inc. 2011–2018. All rights reserved CLASSIFICATION Identifying to which category an object belongs to Examples: spam detection, diabetes diagnosis, text labeling Algorithms: • Logistic Regression • Fast training (linear model) • Classes expressed in probabilities • Less overfitting [+] • Less fitting (accuracy) [-] • Support Vector Machines (SVM) • “Best” supervised learning algorithm, effective • State of the art prior to Deep Learning • More robust to outliers than Log Regression • Handles non-linearity • Checkout: blog.statsbot.co/support-vector-machines-tutorial-c1618e635e93 • Random Forest (ensemble of Decision Trees) • Fast training • Handles categorical features • Does not require feature scaling • Captures non-linearity and feature interaction • i.e. performs feature selection / PCA implicitly • Naïve Bayes • Good for text classification • Assumes independent variables / words
  • 16. 16 © Hortonworks Inc. 2011–2018. All rights reserved Visual Intro to Decision Trees • http://www.r2d3.us/visual-intro-to-machine-learning-part-1 CLASSIFICATION
  • 17. 17 © Hortonworks Inc. 2011–2018. All rights reserved CLUSTERING Automatic grouping of similar objects into sets (clusters) Example: market segmentation – auto group customers into different market segments Algorithms: K-means, LDA
  • 18. 18 © Hortonworks Inc. 2011–2018. All rights reserved COLLABORATIVE FILTERING Fill in the missing entries of a user-item association matrix Applications: Product/movie recommendation Algorithms: Alternating Least Squares (ALS)
  • 19. 19 © Hortonworks Inc. 2011–2018. All rights reserved DIMENSIONALITY REDUCTION Reducing the number of redundant features/variables Applications: • Removing noise in images by selecting only “important” features • Removing redundant features, e.g. MPH & KPH are linearly dependent Algorithms: Principal Component Analysis (PCA)
  • 20. 20 © Hortonworks Inc. 2011–2018. All rights reserved Deep Learning 20
  • 21. 21 © Hortonworks Inc. 2011–2018. All rights reserved
  • 22. 22 © Hortonworks Inc. 2011–2018. All rights reserved Simple/shallow vs Deep Neural Net
  • 23. 23 © Hortonworks Inc. 2011–2018. All rights reserved • Convolutional Neural Nets (CNNs) • Recurrent Neural Nets (RNNs) • Long Short-Term Memory (LSTM) Popular Neural Net Architectures  Images  Text / Language (NLP) & Time Series
  • 24. 24 © Hortonworks Inc. 2011–2018. All rights reserved Number Probability 0 0.03 1 0.01 2 0.04 3 0.08 4 0.05 5 0.08 6 0.07 7 0.02 8 0.54 9 0.08
  • 25. 25 © Hortonworks Inc. 2011–2018. All rights reserved scs.ryerson.ca/~aharley/vis/conv/flat.html
  • 26. 26 © Hortonworks Inc. 2011–2018. All rights reserved Quickly Training Deep Learning Models with Transfer Learning 26
  • 27. 27 © Hortonworks Inc. 2011–2018. All rights reserved How to Build a Deep Learning Image Recognition System? African Bush Elephant Indian Elephant Sri Lankan Elephant Borneo Pygmy Elephant Step 1: Download examples to train the model with
  • 28. 28 © Hortonworks Inc. 2011–2018. All rights reserved How to Build a Deep Learning Image Recognition System? Step 2: Augment dataset to enrich training data  Adds 5-10x more training examples
  • 29. 29 © Hortonworks Inc. 2011–2018. All rights reserved dawn.cs.stanford.edu/benchmark Step 3: Checkout DAWNBench then select and download a pre-trained model. How to Build a Deep Learning Image Recognition System?
  • 30. 30 © Hortonworks Inc. 2011–2018. All rights reserved Source: https://www.mathworks.com/videos/introduction-to-deep-learning-what-are-convolutional-neural-networks--1489512765771.html Sample Architecture of a CNN
  • 31. 31 © Hortonworks Inc. 2011–2018. All rights reserved Source: https://www.mathworks.com/videos/introduction-to-deep-learning-what-are-convolutional-neural-networks--1489512765771.html Sample Architecture of a CNN Pretrained Parameters Random Parameters
  • 32. 32 © Hortonworks Inc. 2011–2018. All rights reserved Step 4: Apply transfer learning to a downloaded model How to Build a Deep Learning Image Recognition System? Pretrained Network (millions of parameters) Random ParametersINPUT OUTPUT Borneo Pygmy Elephant Train Parameters Step A Adjust Parameters Step B image label
  • 33. 33 © Hortonworks Inc. 2011–2018. All rights reserved Step 5: Save the trained model How to Build a Deep Learning Image Recognition System? Pretrained Network (millions of parameters) Random ParametersINPUT OUTPUT Train Parameters Adjust Parameters Trained Model (Neural Net)
  • 34. 34 © Hortonworks Inc. 2011–2018. All rights reserved Step 6: Host a trained model on a server and make it accessible via a web app How to Build a Deep Learning Image Recognition System? User uploads Borneo Pygmy Elephant Web app returns
  • 35. 35 © Hortonworks Inc. 2011–2018. All rights reserved DATA SCIENCE JOURNEY
  • 36. 36 © Hortonworks Inc. 2011–2018. All rights reserved
  • 37. 37 © Hortonworks Inc. 2011–2018. All rights reserved Start by Asking Relevant Questions • Specific (can you think of a clear answer?) • Measurable (quantifiable? data driven?) • Actionable (if you had an answer, could you do something with it?) • Realistic (can you get an answer with data you have?) • Timely (answer in reasonable timeframe?)
  • 38. 38 © Hortonworks Inc. 2011–2018. All rights reserved Data Preparation 1. Data analysis (audit for anomalies/errors) 2. Creating an intuitive workflow (formulate seq. of prep operations) 3. Validation (correctness evaluated against sample representative dataset) 4. Transformation (actual prep process takes place) 5. Backflow of cleaned data (replace original dirty data) Approx. 80% of Data Analyst’s job is Data Preparation! Example of multiple values used for U.S. States  California, CA, Cal., Cal
  • 39. 39 © Hortonworks Inc. 2011–2018. All rights reserved Visualizing Data https://www.autodeskresearch.com/publications/samestats
  • 40. 40 © Hortonworks Inc. 2011–2018. All rights reserved Feature Selection • Also known as variable or attribute selection • Why important? • simplification of models  easier to interpret by researchers/users • shorter training times • enhanced generalization by reducing overfitting • Dimensionality reduction vs feature selection • Dimensionality reduction: create new combinations of attributes • Feature selection: include/exclude attributes in data without changing them Q: Which features should you use to create a predictive model?
  • 41. 41 © Hortonworks Inc. 2011–2018. All rights reserved Hyperparameters • Define higher-level model properties, e.g. complexity or learning rate • Cannot be learned during training  need to be predefined • Can be decided by • setting different values • training different models • choosing the values that test better • Hyperparameter examples • Number of leaves or depth of a tree • Number of latent factors in a matrix factorization • Learning rate (in many models) • Number of hidden layers in a deep neural network • Number of clusters in a k-means clustering
  • 42. 42 © Hortonworks Inc. 2011–2018. All rights reserved • Residuals • residual of an observed value is the difference between the observed value and the estimated value • R2 (R Squared) – Coefficient of Determination • indicates a goodness of fit • R2 of 1 means regression line perfectly fits data • RMSE (Root Mean Square Error) • measure of differences between values predicted by a model and values actually observed • good measure of accuracy, but only to compare forecasting errors of different models (individual variables are scale-dependent)
  • 43. 43 © Hortonworks Inc. 2011–2018. All rights reserved With that in mind… • No simple formula for “good questions” only general guidelines • The right data is better than lots of data • Understanding relationships matters
  • 44. 44 © Hortonworks Inc. 2011–2018. All rights reserved Enterprise Data Science @ Scale Enterprise- Grade Leverage enterprise-grade security, governance and operations Tools Enhance productivity by enabling data scientists to use their favorite tools, technologies and libraries Deployment Compress the time to insight by deploying models into production faster Data Build more robust models by using all the data in the data lake
  • 45. 45 © Hortonworks Inc. 2011–2018. All rights reserved Thanks! Robert Hryniewicz @robhryniewicz
  • 46. 46 © Hortonworks Inc. 2011–2018. All rights reserved Easier intro books (less math) • The Hundred-Page Machine Learning Book by Andriy Burkov • Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems by Aurélien Géron • Deep Learning with Python by Francois Chollet • Fundamentals of Machine Learning for Predictive Data Analytics: Algorithms, Worked Examples, and Case Studies by John D. Kelleher, Brian Mac Namee, Aoife D’Arcy More thorough books (more math) • Deep Learning by Ian Goodfellow, Yoshua Bengio, Aaron Courville • Information Theory, Inference and Learning Algorithms 1st Edition by David J. C. MacKay Machine Learning Books
  • 47. 47 © Hortonworks Inc. 2011–2018. All rights reserved

Editor's Notes

  • #38: Specific: Can you think of what an answer to your question would look like? The more clearly you can see it, the more specific the question is. Measurable: Is the answer something you can quantify? It’s hard to make decisions based off things that aren’t in a really data-driven way. Actionable: If you had the answer to your question, could you do something useful with it? If not, you don’t necessarily have a bad question but you may not want to expend a lot of resources answering it. Realistic: Can you get an answer to your question with the data you have? If not, can you get the data that would get you an answer? Timely: Can you get an answer in a reasonable time frame, or at least as before you need it? This is usually not a big issue, but if you operate according to a tight schedule, you may need to think about it.