SlideShare a Scribd company logo
1 of 27
Download to read offline
Like-for-Like Comparsion of Machine Learning
Algorithms
Sensitivity Analysis of ML Hyperparameters
Dominik Dahlem
2016-09-25 Sun
Who am I?
• Dominik Dahlem, Lead Data Scientist, Boxever
 dominik.dahlem@boxever.com
 http://ie.linkedin.com/in/ddahlem
 http://github.com/dahlem
 @dahlemd
Introduction
Outline
1 Introduction
2 Building ML Models
3 Example: RL Gridworld
4 Summary
Introduction
Boxever
• Boxever is a Data Science company with a Customer
Intelligence Cloud for Travel
• Our cloud analytical services need to be well-tuned and robust
• e.g., recommendation models, propensity models, etc.
Introduction
Machine Learning Models are like…
Introduction
Goal
• Tuning
• ML algorithms tend to be governed by tunable parameters
typically referred as hyperparameters
• They are not trained
• Require trial-and-error fine tuning
• Sensitivity Analysis
• Does a small perburbation in the parameters change the output
dramatically?
• Visual inspection easy in ML algorithms with very few
hyperparameters
• But mathematical treatment necessary in high dimensions
Building ML Models
Outline
1 Introduction
2 Building ML Models
3 Example: RL Gridworld
4 Summary
Building ML Models
Evaluating a ML Model Hypothesis
• A hypothesis (given the hyperparameters) may overfit → How
do we know?
• We have a low error, but the model is still inaccurate
• Test-driven development and debugging ↔ Statistical Diagnostics
1 With a given dataset, split into two sets: training and test
2 Fix hyperparameters
3 Learn model parameters and minimise the corresponding error
using the training set
4 Compute the test error using the test set
Building ML Models
Model Selection
• Without the validation set
• Optimise ML parameters using the training set for each
hypothesis (e.g., polynomial degree)
• Select the hypothesis with the smallest test error
• Estimate the generalisation error also using the test set →
optimistic error estimates
• With validation set
• Optimise ML parameters using the training set for each
hypothesis (e.g., polynomial degree)
• Select the hypothesis with the smallest cross-validation error
• Estimate the generalisation error also using the test set
Building ML Models
General ML Pipeline
• Parameter search
• grid vs random vs active
learning
• We found well-performing model,
but
• are the parameters sensitive to
minute changes?
Building ML Models
Sensitivity Analysis1
• Hyperparameter tuning using
e.g., Spearmint
• integrate uncertainty of the
k-fold CV
• model the parameter surface
on the mean error metric from
CV
• Characterise the nature of the
hyperparameter surface in the
vicinity of the optimal point (e.g.,
the one that minimised the error
of the ML algorithm)
1George E. P. Box and Norman R. Draper (2007). Response Surfaces, Mixtures, and Ridge Analyses. 2nd ed.
Wiley-Interscience.
Building ML Models
Bias vs. Variance
Jtraining(θ)
JCV(θ)
Optimal
Underfitting
(high bias)
Overfitting
(high variance)
d (polynomial degree)
J(θ)
• What is the source of bad predictions?
Building ML Models
Regularisation and Bias/Variance
Jtraining(θ)
JCV(θ)
Optimal
Overfitting
(high variance)
Underfitting
(high bias)
λ (regularisation)
J(θ)
Building ML Models
Learning Curves (High Bias)
Jtest(θ)
Jtraining(θ)
Desired
N (training set size)
J(θ)
• More training data will not help!
Building ML Models
Learning Curves (High Variance)
Jtest(θ)
Jtraining(θ)
Desired
N (training set size)
J(θ)
• More training data will likely help!
Example: RL Gridworld
Outline
1 Introduction
2 Building ML Models
3 Example: RL Gridworld
4 Summary
Example: RL Gridworld
Overview
• Teach a computer to find a
path to a goal
• Actions: N, E, S, W
• Classifying grids?
• Trial and Error?
Example: RL Gridworld
SARSA(λ)
• SARSA update rule:
Q(s, a) ← Q(s, a) + α [r + γQ(s , a ) − Q(s, a)] . (1)
• s: the state, i.e., cell on the grid
• a: the action, i.e., N, E, S, W
• Q(s, a): state-action value function
• here: lookup table
• r: the reward received for performing action a in state s
• α: the learning rate
• γ: the discount factor
Example: RL Gridworld
RL Gridworld Pipeline
• Optimise the learning rate and
the discount factor
• α ∈ [0.0001, 0.3]
• γ ∈ [0.01, 0.95]
• Fixed parameters for brevity:
• greedy policy
• the eligibility traces λ
• episodes N = 2000
Example: RL Gridworld
Hyperparameter Tuning
α
0.000.050.100.150.200.250.30γ
0.0
0.2
0.4
0.6
0.8
0
100
200
300
400
68
72
76
80
84
88
92
96
100
Example: RL Gridworld
Overview: Canonical Analysis2
• Find the optimum point using a
constrained optimisation method
that can escape local minima
• α = 0.0001, γ = 0.577
• Restrict the canonical analysis to
a subset of the parameter space
around the optimum value
• α ∈ [0.0001, 0.03]
• γ ∈ [0.48, 0.67]
• Trace the α, γ, and estimated
number of steps along the
maximum path
• eigen-system analysis of the
covariance matrix of the
hyperparameter surface
2George E. P. Box and Norman R. Draper (2007). Response Surfaces, Mixtures, and Ridge Analyses. 2nd ed.
Wiley-Interscience.
Example: RL Gridworld
Maximum Path
0.15 0.2 0.25
0.3
0.4
0.5
ScaledParameters
α
γ
0.15 0.2 0.25
90
91
92
93
R
y
Example: RL Gridworld
Tuned Gridworld
0
Summary
Outline
1 Introduction
2 Building ML Models
3 Example: RL Gridworld
4 Summary
Summary
• Enable like-for-like ML model evaluations
• Tuning, e.g.,
• Spearmint: https://github.com/JasperSnoek/spearmint
• SMAC: http://www.cs.ubc.ca/labs/beta/Projects/SMAC/
• hyperopt: http://hyperopt.github.io/hyperopt/
• Canonical Anlaysis
• Sensitivity of the hyperparameters when subjected to small
perturbations around the optimum
• Assess the sensitivity of the HP between competing ML models
• Choose an ML model that does not exhibit minima that are
surrounded by very steep slopes in the hyperparameter surface
Boxever
Thank You!
dominik.dahlem@boxever.com
Acknowledgements
• Images:
• Rube Goldberg’s Self-Operating Napkin

More Related Content

What's hot

Meta-Learning with Implicit Gradients
Meta-Learning with Implicit GradientsMeta-Learning with Implicit Gradients
Meta-Learning with Implicit GradientsSangwoo Mo
 
Exploration Strategies in Reinforcement Learning
Exploration Strategies in Reinforcement LearningExploration Strategies in Reinforcement Learning
Exploration Strategies in Reinforcement LearningDongmin Lee
 
Optimization in deep learning
Optimization in deep learningOptimization in deep learning
Optimization in deep learningJeremy Nixon
 
Matineh Shaker, Artificial Intelligence Scientist, Bonsai at MLconf SF 2017
Matineh Shaker, Artificial Intelligence Scientist, Bonsai at MLconf SF 2017Matineh Shaker, Artificial Intelligence Scientist, Bonsai at MLconf SF 2017
Matineh Shaker, Artificial Intelligence Scientist, Bonsai at MLconf SF 2017MLconf
 
Silicon valleycodecamp2013
Silicon valleycodecamp2013Silicon valleycodecamp2013
Silicon valleycodecamp2013Sanjeev Mishra
 
DQN (Deep Q-Network)
DQN (Deep Q-Network)DQN (Deep Q-Network)
DQN (Deep Q-Network)Dong Guo
 
Value Function Approximation via Low-Rank Models
Value Function Approximation via Low-Rank ModelsValue Function Approximation via Low-Rank Models
Value Function Approximation via Low-Rank ModelsLyft
 
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...MLconf
 

What's hot (11)

Meta-Learning with Implicit Gradients
Meta-Learning with Implicit GradientsMeta-Learning with Implicit Gradients
Meta-Learning with Implicit Gradients
 
Exploration Strategies in Reinforcement Learning
Exploration Strategies in Reinforcement LearningExploration Strategies in Reinforcement Learning
Exploration Strategies in Reinforcement Learning
 
Optimization in deep learning
Optimization in deep learningOptimization in deep learning
Optimization in deep learning
 
ML_in_QM_JC_02-10-18
ML_in_QM_JC_02-10-18ML_in_QM_JC_02-10-18
ML_in_QM_JC_02-10-18
 
Matineh Shaker, Artificial Intelligence Scientist, Bonsai at MLconf SF 2017
Matineh Shaker, Artificial Intelligence Scientist, Bonsai at MLconf SF 2017Matineh Shaker, Artificial Intelligence Scientist, Bonsai at MLconf SF 2017
Matineh Shaker, Artificial Intelligence Scientist, Bonsai at MLconf SF 2017
 
Silicon valleycodecamp2013
Silicon valleycodecamp2013Silicon valleycodecamp2013
Silicon valleycodecamp2013
 
DQN (Deep Q-Network)
DQN (Deep Q-Network)DQN (Deep Q-Network)
DQN (Deep Q-Network)
 
Value Function Approximation via Low-Rank Models
Value Function Approximation via Low-Rank ModelsValue Function Approximation via Low-Rank Models
Value Function Approximation via Low-Rank Models
 
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
Hanjun Dai, PhD Student, School of Computational Science and Engineering, Geo...
 
Analysis of algorithm
Analysis of algorithmAnalysis of algorithm
Analysis of algorithm
 
Lec3 dqn
Lec3 dqnLec3 dqn
Lec3 dqn
 

Similar to Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Boxever

Machine learning and linear regression programming
Machine learning and linear regression programmingMachine learning and linear regression programming
Machine learning and linear regression programmingSoumya Mukherjee
 
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsMark Peng
 
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016MLconf
 
MLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott ClarkMLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott ClarkSigOpt
 
Generalized Linear Models in Spark MLlib and SparkR by Xiangrui Meng
Generalized Linear Models in Spark MLlib and SparkR by Xiangrui MengGeneralized Linear Models in Spark MLlib and SparkR by Xiangrui Meng
Generalized Linear Models in Spark MLlib and SparkR by Xiangrui MengSpark Summit
 
Generalized Linear Models in Spark MLlib and SparkR
Generalized Linear Models in Spark MLlib and SparkRGeneralized Linear Models in Spark MLlib and SparkR
Generalized Linear Models in Spark MLlib and SparkRDatabricks
 
Augmenting Machine Learning with Databricks Labs AutoML Toolkit
Augmenting Machine Learning with Databricks Labs AutoML ToolkitAugmenting Machine Learning with Databricks Labs AutoML Toolkit
Augmenting Machine Learning with Databricks Labs AutoML ToolkitDatabricks
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkIvo Andreev
 
Taking your machine learning workflow to the next level using Scikit-Learn Pi...
Taking your machine learning workflow to the next level using Scikit-Learn Pi...Taking your machine learning workflow to the next level using Scikit-Learn Pi...
Taking your machine learning workflow to the next level using Scikit-Learn Pi...Philip Goddard
 
Techniques in Deep Learning
Techniques in Deep LearningTechniques in Deep Learning
Techniques in Deep LearningSourya Dey
 
Large-Scale Lasso and Elastic-Net Regularized Generalized Linear Models (DB T...
Large-Scale Lasso and Elastic-Net Regularized Generalized Linear Models (DB T...Large-Scale Lasso and Elastic-Net Regularized Generalized Linear Models (DB T...
Large-Scale Lasso and Elastic-Net Regularized Generalized Linear Models (DB T...Spark Summit
 
machine learning workflow with data input.pptx
machine learning workflow with data input.pptxmachine learning workflow with data input.pptx
machine learning workflow with data input.pptxjasontseng19
 
Augmenting Machine Learning with Databricks Labs AutoML Toolkit
Augmenting Machine Learning with Databricks Labs AutoML ToolkitAugmenting Machine Learning with Databricks Labs AutoML Toolkit
Augmenting Machine Learning with Databricks Labs AutoML ToolkitDatabricks
 
Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxIvo Andreev
 
Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...Dalei Li
 
30thSep2014
30thSep201430thSep2014
30thSep2014Mia liu
 
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...PyData
 
Revolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
Revolutionise your Machine Learning Workflow using Scikit-Learn PipelinesRevolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
Revolutionise your Machine Learning Workflow using Scikit-Learn PipelinesPhilip Goddard
 
Automated Hyperparameter Tuning, Scaling and Tracking
Automated Hyperparameter Tuning, Scaling and TrackingAutomated Hyperparameter Tuning, Scaling and Tracking
Automated Hyperparameter Tuning, Scaling and TrackingDatabricks
 
House Sale Price Prediction
House Sale Price PredictionHouse Sale Price Prediction
House Sale Price Predictionsriram30691
 

Similar to Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Boxever (20)

Machine learning and linear regression programming
Machine learning and linear regression programmingMachine learning and linear regression programming
Machine learning and linear regression programming
 
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle Competitions
 
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
 
MLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott ClarkMLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott Clark
 
Generalized Linear Models in Spark MLlib and SparkR by Xiangrui Meng
Generalized Linear Models in Spark MLlib and SparkR by Xiangrui MengGeneralized Linear Models in Spark MLlib and SparkR by Xiangrui Meng
Generalized Linear Models in Spark MLlib and SparkR by Xiangrui Meng
 
Generalized Linear Models in Spark MLlib and SparkR
Generalized Linear Models in Spark MLlib and SparkRGeneralized Linear Models in Spark MLlib and SparkR
Generalized Linear Models in Spark MLlib and SparkR
 
Augmenting Machine Learning with Databricks Labs AutoML Toolkit
Augmenting Machine Learning with Databricks Labs AutoML ToolkitAugmenting Machine Learning with Databricks Labs AutoML Toolkit
Augmenting Machine Learning with Databricks Labs AutoML Toolkit
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it Work
 
Taking your machine learning workflow to the next level using Scikit-Learn Pi...
Taking your machine learning workflow to the next level using Scikit-Learn Pi...Taking your machine learning workflow to the next level using Scikit-Learn Pi...
Taking your machine learning workflow to the next level using Scikit-Learn Pi...
 
Techniques in Deep Learning
Techniques in Deep LearningTechniques in Deep Learning
Techniques in Deep Learning
 
Large-Scale Lasso and Elastic-Net Regularized Generalized Linear Models (DB T...
Large-Scale Lasso and Elastic-Net Regularized Generalized Linear Models (DB T...Large-Scale Lasso and Elastic-Net Regularized Generalized Linear Models (DB T...
Large-Scale Lasso and Elastic-Net Regularized Generalized Linear Models (DB T...
 
machine learning workflow with data input.pptx
machine learning workflow with data input.pptxmachine learning workflow with data input.pptx
machine learning workflow with data input.pptx
 
Augmenting Machine Learning with Databricks Labs AutoML Toolkit
Augmenting Machine Learning with Databricks Labs AutoML ToolkitAugmenting Machine Learning with Databricks Labs AutoML Toolkit
Augmenting Machine Learning with Databricks Labs AutoML Toolkit
 
Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackbox
 
Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...Two strategies for large-scale multi-label classification on the YouTube-8M d...
Two strategies for large-scale multi-label classification on the YouTube-8M d...
 
30thSep2014
30thSep201430thSep2014
30thSep2014
 
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
Driving Moore's Law with Python-Powered Machine Learning: An Insider's Perspe...
 
Revolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
Revolutionise your Machine Learning Workflow using Scikit-Learn PipelinesRevolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
Revolutionise your Machine Learning Workflow using Scikit-Learn Pipelines
 
Automated Hyperparameter Tuning, Scaling and Tracking
Automated Hyperparameter Tuning, Scaling and TrackingAutomated Hyperparameter Tuning, Scaling and Tracking
Automated Hyperparameter Tuning, Scaling and Tracking
 
House Sale Price Prediction
House Sale Price PredictionHouse Sale Price Prediction
House Sale Price Prediction
 

More from WithTheBest

Riccardo Vittoria
Riccardo VittoriaRiccardo Vittoria
Riccardo VittoriaWithTheBest
 
Recreating history in virtual reality
Recreating history in virtual realityRecreating history in virtual reality
Recreating history in virtual realityWithTheBest
 
Engaging and sharing your VR experience
Engaging and sharing your VR experienceEngaging and sharing your VR experience
Engaging and sharing your VR experienceWithTheBest
 
How to survive the early days of VR as an Indie Studio
How to survive the early days of VR as an Indie StudioHow to survive the early days of VR as an Indie Studio
How to survive the early days of VR as an Indie StudioWithTheBest
 
Mixed reality 101
Mixed reality 101 Mixed reality 101
Mixed reality 101 WithTheBest
 
Unlocking Human Potential with Immersive Technology
Unlocking Human Potential with Immersive TechnologyUnlocking Human Potential with Immersive Technology
Unlocking Human Potential with Immersive TechnologyWithTheBest
 
Building your own video devices
Building your own video devicesBuilding your own video devices
Building your own video devicesWithTheBest
 
Maximizing performance of 3 d user generated assets in unity
Maximizing performance of 3 d user generated assets in unityMaximizing performance of 3 d user generated assets in unity
Maximizing performance of 3 d user generated assets in unityWithTheBest
 
Haptics & amp; null space vr
Haptics & amp; null space vrHaptics & amp; null space vr
Haptics & amp; null space vrWithTheBest
 
How we use vr to break the laws of physics
How we use vr to break the laws of physicsHow we use vr to break the laws of physics
How we use vr to break the laws of physicsWithTheBest
 
The Virtual Self
The Virtual Self The Virtual Self
The Virtual Self WithTheBest
 
You dont have to be mad to do VR and AR ... but it helps
You dont have to be mad to do VR and AR ... but it helpsYou dont have to be mad to do VR and AR ... but it helps
You dont have to be mad to do VR and AR ... but it helpsWithTheBest
 
Omnivirt overview
Omnivirt overviewOmnivirt overview
Omnivirt overviewWithTheBest
 
VR Interactions - Jason Jerald
VR Interactions - Jason JeraldVR Interactions - Jason Jerald
VR Interactions - Jason JeraldWithTheBest
 
Japheth Funding your startup - dating the devil
Japheth  Funding your startup - dating the devilJapheth  Funding your startup - dating the devil
Japheth Funding your startup - dating the devilWithTheBest
 
Transported vr the virtual reality platform for real estate
Transported vr the virtual reality platform for real estateTransported vr the virtual reality platform for real estate
Transported vr the virtual reality platform for real estateWithTheBest
 
Measuring Behavior in VR - Rob Merki Cognitive VR
Measuring Behavior in VR - Rob Merki Cognitive VRMeasuring Behavior in VR - Rob Merki Cognitive VR
Measuring Behavior in VR - Rob Merki Cognitive VRWithTheBest
 
Global demand for Mixed Realty (VR/AR) content is about to explode.
Global demand for Mixed Realty (VR/AR) content is about to explode. Global demand for Mixed Realty (VR/AR) content is about to explode.
Global demand for Mixed Realty (VR/AR) content is about to explode. WithTheBest
 
VR, a new technology over 40,000 years old
VR, a new technology over 40,000 years oldVR, a new technology over 40,000 years old
VR, a new technology over 40,000 years oldWithTheBest
 

More from WithTheBest (20)

Riccardo Vittoria
Riccardo VittoriaRiccardo Vittoria
Riccardo Vittoria
 
Recreating history in virtual reality
Recreating history in virtual realityRecreating history in virtual reality
Recreating history in virtual reality
 
Engaging and sharing your VR experience
Engaging and sharing your VR experienceEngaging and sharing your VR experience
Engaging and sharing your VR experience
 
How to survive the early days of VR as an Indie Studio
How to survive the early days of VR as an Indie StudioHow to survive the early days of VR as an Indie Studio
How to survive the early days of VR as an Indie Studio
 
Mixed reality 101
Mixed reality 101 Mixed reality 101
Mixed reality 101
 
Unlocking Human Potential with Immersive Technology
Unlocking Human Potential with Immersive TechnologyUnlocking Human Potential with Immersive Technology
Unlocking Human Potential with Immersive Technology
 
Building your own video devices
Building your own video devicesBuilding your own video devices
Building your own video devices
 
Maximizing performance of 3 d user generated assets in unity
Maximizing performance of 3 d user generated assets in unityMaximizing performance of 3 d user generated assets in unity
Maximizing performance of 3 d user generated assets in unity
 
Wizdish rovr
Wizdish rovrWizdish rovr
Wizdish rovr
 
Haptics & amp; null space vr
Haptics & amp; null space vrHaptics & amp; null space vr
Haptics & amp; null space vr
 
How we use vr to break the laws of physics
How we use vr to break the laws of physicsHow we use vr to break the laws of physics
How we use vr to break the laws of physics
 
The Virtual Self
The Virtual Self The Virtual Self
The Virtual Self
 
You dont have to be mad to do VR and AR ... but it helps
You dont have to be mad to do VR and AR ... but it helpsYou dont have to be mad to do VR and AR ... but it helps
You dont have to be mad to do VR and AR ... but it helps
 
Omnivirt overview
Omnivirt overviewOmnivirt overview
Omnivirt overview
 
VR Interactions - Jason Jerald
VR Interactions - Jason JeraldVR Interactions - Jason Jerald
VR Interactions - Jason Jerald
 
Japheth Funding your startup - dating the devil
Japheth  Funding your startup - dating the devilJapheth  Funding your startup - dating the devil
Japheth Funding your startup - dating the devil
 
Transported vr the virtual reality platform for real estate
Transported vr the virtual reality platform for real estateTransported vr the virtual reality platform for real estate
Transported vr the virtual reality platform for real estate
 
Measuring Behavior in VR - Rob Merki Cognitive VR
Measuring Behavior in VR - Rob Merki Cognitive VRMeasuring Behavior in VR - Rob Merki Cognitive VR
Measuring Behavior in VR - Rob Merki Cognitive VR
 
Global demand for Mixed Realty (VR/AR) content is about to explode.
Global demand for Mixed Realty (VR/AR) content is about to explode. Global demand for Mixed Realty (VR/AR) content is about to explode.
Global demand for Mixed Realty (VR/AR) content is about to explode.
 
VR, a new technology over 40,000 years old
VR, a new technology over 40,000 years oldVR, a new technology over 40,000 years old
VR, a new technology over 40,000 years old
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Boxever

  • 1. Like-for-Like Comparsion of Machine Learning Algorithms Sensitivity Analysis of ML Hyperparameters Dominik Dahlem 2016-09-25 Sun
  • 2. Who am I? • Dominik Dahlem, Lead Data Scientist, Boxever  dominik.dahlem@boxever.com  http://ie.linkedin.com/in/ddahlem  http://github.com/dahlem  @dahlemd
  • 3. Introduction Outline 1 Introduction 2 Building ML Models 3 Example: RL Gridworld 4 Summary
  • 4. Introduction Boxever • Boxever is a Data Science company with a Customer Intelligence Cloud for Travel • Our cloud analytical services need to be well-tuned and robust • e.g., recommendation models, propensity models, etc.
  • 6. Introduction Goal • Tuning • ML algorithms tend to be governed by tunable parameters typically referred as hyperparameters • They are not trained • Require trial-and-error fine tuning • Sensitivity Analysis • Does a small perburbation in the parameters change the output dramatically? • Visual inspection easy in ML algorithms with very few hyperparameters • But mathematical treatment necessary in high dimensions
  • 7. Building ML Models Outline 1 Introduction 2 Building ML Models 3 Example: RL Gridworld 4 Summary
  • 8. Building ML Models Evaluating a ML Model Hypothesis • A hypothesis (given the hyperparameters) may overfit → How do we know? • We have a low error, but the model is still inaccurate • Test-driven development and debugging ↔ Statistical Diagnostics 1 With a given dataset, split into two sets: training and test 2 Fix hyperparameters 3 Learn model parameters and minimise the corresponding error using the training set 4 Compute the test error using the test set
  • 9. Building ML Models Model Selection • Without the validation set • Optimise ML parameters using the training set for each hypothesis (e.g., polynomial degree) • Select the hypothesis with the smallest test error • Estimate the generalisation error also using the test set → optimistic error estimates • With validation set • Optimise ML parameters using the training set for each hypothesis (e.g., polynomial degree) • Select the hypothesis with the smallest cross-validation error • Estimate the generalisation error also using the test set
  • 10. Building ML Models General ML Pipeline • Parameter search • grid vs random vs active learning • We found well-performing model, but • are the parameters sensitive to minute changes?
  • 11. Building ML Models Sensitivity Analysis1 • Hyperparameter tuning using e.g., Spearmint • integrate uncertainty of the k-fold CV • model the parameter surface on the mean error metric from CV • Characterise the nature of the hyperparameter surface in the vicinity of the optimal point (e.g., the one that minimised the error of the ML algorithm) 1George E. P. Box and Norman R. Draper (2007). Response Surfaces, Mixtures, and Ridge Analyses. 2nd ed. Wiley-Interscience.
  • 12. Building ML Models Bias vs. Variance Jtraining(θ) JCV(θ) Optimal Underfitting (high bias) Overfitting (high variance) d (polynomial degree) J(θ) • What is the source of bad predictions?
  • 13. Building ML Models Regularisation and Bias/Variance Jtraining(θ) JCV(θ) Optimal Overfitting (high variance) Underfitting (high bias) λ (regularisation) J(θ)
  • 14. Building ML Models Learning Curves (High Bias) Jtest(θ) Jtraining(θ) Desired N (training set size) J(θ) • More training data will not help!
  • 15. Building ML Models Learning Curves (High Variance) Jtest(θ) Jtraining(θ) Desired N (training set size) J(θ) • More training data will likely help!
  • 16. Example: RL Gridworld Outline 1 Introduction 2 Building ML Models 3 Example: RL Gridworld 4 Summary
  • 17. Example: RL Gridworld Overview • Teach a computer to find a path to a goal • Actions: N, E, S, W • Classifying grids? • Trial and Error?
  • 18. Example: RL Gridworld SARSA(λ) • SARSA update rule: Q(s, a) ← Q(s, a) + α [r + γQ(s , a ) − Q(s, a)] . (1) • s: the state, i.e., cell on the grid • a: the action, i.e., N, E, S, W • Q(s, a): state-action value function • here: lookup table • r: the reward received for performing action a in state s • α: the learning rate • γ: the discount factor
  • 19. Example: RL Gridworld RL Gridworld Pipeline • Optimise the learning rate and the discount factor • α ∈ [0.0001, 0.3] • γ ∈ [0.01, 0.95] • Fixed parameters for brevity: • greedy policy • the eligibility traces λ • episodes N = 2000
  • 20. Example: RL Gridworld Hyperparameter Tuning α 0.000.050.100.150.200.250.30γ 0.0 0.2 0.4 0.6 0.8 0 100 200 300 400 68 72 76 80 84 88 92 96 100
  • 21. Example: RL Gridworld Overview: Canonical Analysis2 • Find the optimum point using a constrained optimisation method that can escape local minima • α = 0.0001, γ = 0.577 • Restrict the canonical analysis to a subset of the parameter space around the optimum value • α ∈ [0.0001, 0.03] • γ ∈ [0.48, 0.67] • Trace the α, γ, and estimated number of steps along the maximum path • eigen-system analysis of the covariance matrix of the hyperparameter surface 2George E. P. Box and Norman R. Draper (2007). Response Surfaces, Mixtures, and Ridge Analyses. 2nd ed. Wiley-Interscience.
  • 22. Example: RL Gridworld Maximum Path 0.15 0.2 0.25 0.3 0.4 0.5 ScaledParameters α γ 0.15 0.2 0.25 90 91 92 93 R y
  • 24. Summary Outline 1 Introduction 2 Building ML Models 3 Example: RL Gridworld 4 Summary
  • 25. Summary • Enable like-for-like ML model evaluations • Tuning, e.g., • Spearmint: https://github.com/JasperSnoek/spearmint • SMAC: http://www.cs.ubc.ca/labs/beta/Projects/SMAC/ • hyperopt: http://hyperopt.github.io/hyperopt/ • Canonical Anlaysis • Sensitivity of the hyperparameters when subjected to small perturbations around the optimum • Assess the sensitivity of the HP between competing ML models • Choose an ML model that does not exhibit minima that are surrounded by very steep slopes in the hyperparameter surface
  • 27. Acknowledgements • Images: • Rube Goldberg’s Self-Operating Napkin