SlideShare a Scribd company logo
1 of 34
Download to read offline
Multi-Armed Bandits:

Intro, examples and tricks
Dr Ilias Flaounas
Senior Data Scientist at Atlassian
Data Science Sydney meetup
22 March 2016
Motivation
Increase awareness of some very useful but less
known techniques
Demo some current work at Atlassian
Connect it with some research from my past
Hopefully, there will be something useful for everybody
— apologies for the few equations and loose notation
http://www.nancydixonblog.com/2012/05/-why-knowledge-management-didnt-save-general-motors-addressing-complex-issues-
by-convening-conversat.html
( rA,1 )
( rC,2 )
rB,3
+ rA,4 + rA,5
+ rC,6
+ rA,7 / nA
+ rC,8
/ nB
/ nc
µA =
µB =
µC =
1. e-greedy: the best arm is selected for a proportion
of 1-e of the trials and a random arm in e trials.
2. e-greedy with variable e
3. Pure exploration first, then pure exploitation.
4. …
5. Thompson sampling

(Draw from the estimated beta-distrom
6. Upper Confidence Bound (UCB)
Many solutions…
Disadvantages
Reaching significance for
non-winning arms takes
longer
Unclear stopping criteria

Hard to order non-winning
arms and assess reliably
their impact
Advantages
Reaching significance for
the winning arm is faster

Best arm can change over
time
There are no false
positives in the long term

Optimizely recently introduced MAB rebranded as: 

“Traffic auto-allocation”
Let’s add some context
What happens if we want to assess 100 variations?
How about 1,000 or 10,000 variations?
Contextual Multi-Armed Bandits
rA, t = f(xA,1, xA,2, xA,3…)A -> {xA,1, xA,2, xA,3…}
rB,t = f(xB,1, xB,2, xB,3…)
rC,t = f(xC,1, xC,2, xC,3…)
Experiment parameters, e.g., price, 

#users, product, bundles, colour of UI elements…
B -> {xB,1, xB,2, xB,3…}
C -> {xC,1, xC,2, xC,3…}
We introduce a notion
of proximity or similarity
between arms
A -> {xA,1, xA,2, xA,3…}
B -> {xB,1, xB,2, xB,3…}
Contextual Multi-Armed Bandits
LinUCB
L. Li, W. Chu, J. Langford, R. E. Schapire, “A Contextual-Bandit Approach to Personalized News
Article Recommendation”, WWW, 2010.
The UCB is some expectation plus some confidence level:
µ↵(t) + ↵(t)
We assume there is some unknown vector θ∗, the same for each arm, 

for which:
E[ra,t|xa,t] = xT
a,t✓⇤
ˆ✓t := C 1
t XT
t yt
Xt := {xa(1),1, xa(2),2, . . . , xa(t),t}T
yt := {ra(1),1, ra(2),2, . . . , ra(t),t}T
Ct := XT
t Xt
Using least squares:
ˆµa(t) := xT
a,t
ˆ✓t
E[ra,t|xa,t] = xT
a,t✓⇤
µ↵(t) + ↵(t)
ˆµa := xT
a,tC 1
t XT
t yt
The upper confidence bound is some expectation plus some confidence level:
µ↵(t) + ↵(t)
ˆ(t) :=
q
xT
a,tC 1
t xa,tˆµa := xT
a,tC 1
t XT
t yt
L. Li, W. Chu, J. Langford, R. E. Schapire, A Contextual-Bandit Approach to Personalized News Article
Recommendation, WWW, 2010.
Product onboarding…
Which arm would you pull?
• How can we locate
the city of Bristol from
tweets?
• 10K candidate
locations organised in
a 100x100 grid
• At every step we get
tweets from one
location and count
mentions of “Bristol”
• Challenge: find the
target in sub-linear
time complexity!
Linear methods fail on this problem.
How can we go non-linear?
John-Shawe Taylor & Nello Cristianini, “Kernel Methods for Pattern Analysis”,
Cambridge University press, 2004.
The Kernel trick! —no, it’s not just for SVMs
ˆµa(t) := xT
a,t
ˆ✓t ˆµa(t) = kT
x,tK 1
t yt
ˆa(t) =
q
tkT
x,tK 2
t kx,tˆ(t) :=
q
xT
a,tC 1
t xa,t
Ct := XT
t Xt Kt = XtXT
t
LinUCB:
M. Valko, N. Korda, R. Munos, I. Flaounas, N. Cristianini, “Finite-Time Analysis of
Kernelised Contextual Bandits”, UAI, 2013.
KernelUCB:
• The last few steps
of the algorithm
before it locates
Bristol.
• KernelUCB with
RBF kernel
converges after
~300 iterations
(instead of >>10K).
Target is the red dot.
We locate it using KernelUCB with RBF kernel.
KernelUCB code: http://www.complacs.org/pmwiki.php/CompLACS/KernelUCB
What if we have a high-dimensional space?
Hashing trick
Implementation in
Vowpal Wabbit, 

by J. Langford, et al.
References
M. Valko, N. Korda, R. Munos, I. Flaounas, N. Cristianini, “Finite-Time Analysis of
Kernelised Contextual Bandits”, UAI, 2013.
L. Li, W. Chu, J. Langford, R. E. Schapire, “A Contextual-Bandit Approach to
Personalized News Article Recommendation”, WWW, 2010.
John-Shawe Taylor & Nello Cristianini, “Kernel Methods for Pattern Analysis”,
Cambridge University press, 2004.
Implementation of KernelUCB in Complacs toolkit:

http://www.complacs.org/pmwiki.php/CompLACS/KernelUCB
https://en.wikipedia.org/wiki/Multi-armed_bandit
https://github.com/JohnLangford/vowpal_wabbit/wiki/Contextual-Bandit-Example
Thank you -
We are hiring!
Dr Ilias Flaounas
Senior Data Scientist
<first>.<last>@atlassian.com

More Related Content

What's hot

Snm Tauctv
Snm TauctvSnm Tauctv
Snm TauctvFNian
 
Lecture 6-cs345-2014
Lecture 6-cs345-2014Lecture 6-cs345-2014
Lecture 6-cs345-2014Rajiv Omar
 
Unsupervised Learning: Clustering
Unsupervised Learning: Clustering Unsupervised Learning: Clustering
Unsupervised Learning: Clustering Experfy
 
Tutorial of topological data analysis part 3(Mapper algorithm)
Tutorial of topological data analysis part 3(Mapper algorithm)Tutorial of topological data analysis part 3(Mapper algorithm)
Tutorial of topological data analysis part 3(Mapper algorithm)Ha Phuong
 
FINDING FREQUENT SUBPATHS IN A GRAPH
FINDING FREQUENT SUBPATHS IN A GRAPHFINDING FREQUENT SUBPATHS IN A GRAPH
FINDING FREQUENT SUBPATHS IN A GRAPHIJDKP
 
cvpr2009: class specific hough forest for object detection
cvpr2009: class specific hough forest for object detectioncvpr2009: class specific hough forest for object detection
cvpr2009: class specific hough forest for object detectionzukun
 
Novel Machine Learning Methods for Extraction of Features Characterizing Data...
Novel Machine Learning Methods for Extraction of Features Characterizing Data...Novel Machine Learning Methods for Extraction of Features Characterizing Data...
Novel Machine Learning Methods for Extraction of Features Characterizing Data...Velimir (monty) Vesselinov
 
Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)Wondmagegn Tafesse
 
Asynchronous Stochastic Optimization, New Analysis and Algorithms
Asynchronous Stochastic Optimization, New Analysis and AlgorithmsAsynchronous Stochastic Optimization, New Analysis and Algorithms
Asynchronous Stochastic Optimization, New Analysis and AlgorithmsFabian Pedregosa
 
Hyperparameter Optimization with Hyperband Algorithm
Hyperparameter Optimization with Hyperband AlgorithmHyperparameter Optimization with Hyperband Algorithm
Hyperparameter Optimization with Hyperband AlgorithmDeep Learning Italia
 
(DL輪読)Matching Networks for One Shot Learning
(DL輪読)Matching Networks for One Shot Learning(DL輪読)Matching Networks for One Shot Learning
(DL輪読)Matching Networks for One Shot LearningMasahiro Suzuki
 
Methods for meta learning in AutoML
Methods for meta learning in AutoMLMethods for meta learning in AutoML
Methods for meta learning in AutoMLMohamed Maher
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithmsSandeep Joshi
 
QTML2021 UAP Quantum Feature Map
QTML2021 UAP Quantum Feature MapQTML2021 UAP Quantum Feature Map
QTML2021 UAP Quantum Feature MapHa Phuong
 
010_20160216_Variational Gaussian Process
010_20160216_Variational Gaussian Process010_20160216_Variational Gaussian Process
010_20160216_Variational Gaussian ProcessHa Phuong
 
Machine teaching tbo_20190518
Machine teaching tbo_20190518Machine teaching tbo_20190518
Machine teaching tbo_20190518Yi-Fan Liou
 

What's hot (18)

Snm Tauctv
Snm TauctvSnm Tauctv
Snm Tauctv
 
Regret of Queueing Bandits
Regret of Queueing BanditsRegret of Queueing Bandits
Regret of Queueing Bandits
 
Lecture 6-cs345-2014
Lecture 6-cs345-2014Lecture 6-cs345-2014
Lecture 6-cs345-2014
 
Unsupervised Learning: Clustering
Unsupervised Learning: Clustering Unsupervised Learning: Clustering
Unsupervised Learning: Clustering
 
Tutorial of topological data analysis part 3(Mapper algorithm)
Tutorial of topological data analysis part 3(Mapper algorithm)Tutorial of topological data analysis part 3(Mapper algorithm)
Tutorial of topological data analysis part 3(Mapper algorithm)
 
FINDING FREQUENT SUBPATHS IN A GRAPH
FINDING FREQUENT SUBPATHS IN A GRAPHFINDING FREQUENT SUBPATHS IN A GRAPH
FINDING FREQUENT SUBPATHS IN A GRAPH
 
cvpr2009: class specific hough forest for object detection
cvpr2009: class specific hough forest for object detectioncvpr2009: class specific hough forest for object detection
cvpr2009: class specific hough forest for object detection
 
Novel Machine Learning Methods for Extraction of Features Characterizing Data...
Novel Machine Learning Methods for Extraction of Features Characterizing Data...Novel Machine Learning Methods for Extraction of Features Characterizing Data...
Novel Machine Learning Methods for Extraction of Features Characterizing Data...
 
Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)
 
Asynchronous Stochastic Optimization, New Analysis and Algorithms
Asynchronous Stochastic Optimization, New Analysis and AlgorithmsAsynchronous Stochastic Optimization, New Analysis and Algorithms
Asynchronous Stochastic Optimization, New Analysis and Algorithms
 
Hyperparameter Optimization with Hyperband Algorithm
Hyperparameter Optimization with Hyperband AlgorithmHyperparameter Optimization with Hyperband Algorithm
Hyperparameter Optimization with Hyperband Algorithm
 
(DL輪読)Matching Networks for One Shot Learning
(DL輪読)Matching Networks for One Shot Learning(DL輪読)Matching Networks for One Shot Learning
(DL輪読)Matching Networks for One Shot Learning
 
Methods for meta learning in AutoML
Methods for meta learning in AutoMLMethods for meta learning in AutoML
Methods for meta learning in AutoML
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithms
 
QTML2021 UAP Quantum Feature Map
QTML2021 UAP Quantum Feature MapQTML2021 UAP Quantum Feature Map
QTML2021 UAP Quantum Feature Map
 
010_20160216_Variational Gaussian Process
010_20160216_Variational Gaussian Process010_20160216_Variational Gaussian Process
010_20160216_Variational Gaussian Process
 
Dmdw1
Dmdw1Dmdw1
Dmdw1
 
Machine teaching tbo_20190518
Machine teaching tbo_20190518Machine teaching tbo_20190518
Machine teaching tbo_20190518
 

Viewers also liked

BanditProblems_final
BanditProblems_finalBanditProblems_final
BanditProblems_finalShweta Gupte
 
Ensemble Contextual Bandits for Personalized Recommendation
Ensemble Contextual Bandits for Personalized RecommendationEnsemble Contextual Bandits for Personalized Recommendation
Ensemble Contextual Bandits for Personalized RecommendationLiang Tang
 
Multi Armed Bandits and Optimized Online Marketing
Multi Armed Bandits and Optimized Online MarketingMulti Armed Bandits and Optimized Online Marketing
Multi Armed Bandits and Optimized Online MarketingMarkus Ojala
 
Optimized Online Marketing in Facebook (Smartly.io)
Optimized Online Marketing in Facebook (Smartly.io)Optimized Online Marketing in Facebook (Smartly.io)
Optimized Online Marketing in Facebook (Smartly.io)Markus Ojala
 
Improving experimentation velocity via Multi-Armed Bandits
Improving experimentation velocity via Multi-Armed BanditsImproving experimentation velocity via Multi-Armed Bandits
Improving experimentation velocity via Multi-Armed BanditsIlias Flaounas
 
A Multi-armed Bandit Approach to Online Spatial Task Assignment
A Multi-armed Bandit Approach to Online Spatial Task AssignmentA Multi-armed Bandit Approach to Online Spatial Task Assignment
A Multi-armed Bandit Approach to Online Spatial Task AssignmentUmair ul Hassan
 
Feeling Lucky? Multi-armed Bandits for Ordering Judgements in Pooling-based E...
Feeling Lucky? Multi-armed Bandits for Ordering Judgements in Pooling-based E...Feeling Lucky? Multi-armed Bandits for Ordering Judgements in Pooling-based E...
Feeling Lucky? Multi-armed Bandits for Ordering Judgements in Pooling-based E...David Losada
 
Olrac SPS Predictive Insurance Solutions
Olrac SPS Predictive Insurance SolutionsOlrac SPS Predictive Insurance Solutions
Olrac SPS Predictive Insurance SolutionsJustin Shanks
 
Combining Linear and Non Linear Modeling Techniques
Combining Linear and Non Linear Modeling Techniques Combining Linear and Non Linear Modeling Techniques
Combining Linear and Non Linear Modeling Techniques Salford Systems
 
The Robos Are Coming - How AI will revolutionize Insurance 0117
The Robos Are Coming - How AI will revolutionize Insurance 0117The Robos Are Coming - How AI will revolutionize Insurance 0117
The Robos Are Coming - How AI will revolutionize Insurance 0117Graham Clark
 
How to use R in different professions: R for Car Insurance Product (Speaker: ...
How to use R in different professions: R for Car Insurance Product (Speaker: ...How to use R in different professions: R for Car Insurance Product (Speaker: ...
How to use R in different professions: R for Car Insurance Product (Speaker: ...Zurich_R_User_Group
 
Conductrics bandit basicsemetrics1016
Conductrics bandit basicsemetrics1016Conductrics bandit basicsemetrics1016
Conductrics bandit basicsemetrics1016Matt Gershoff
 
Predictive Modeling in Underwriting
Predictive Modeling in UnderwritingPredictive Modeling in Underwriting
Predictive Modeling in UnderwritingKevin Pledge
 
Facebook bids, budgets & optimization
Facebook bids, budgets & optimizationFacebook bids, budgets & optimization
Facebook bids, budgets & optimizationMarkus Ojala
 
Uplift Modeling Workshop
Uplift Modeling WorkshopUplift Modeling Workshop
Uplift Modeling Workshopodsc
 
Advanced Pricing in General Insurance
Advanced Pricing in General InsuranceAdvanced Pricing in General Insurance
Advanced Pricing in General InsuranceSyed Danish Ali
 

Viewers also liked (20)

BanditProblems_final
BanditProblems_finalBanditProblems_final
BanditProblems_final
 
Bandit algorithms
Bandit algorithmsBandit algorithms
Bandit algorithms
 
Ensemble Contextual Bandits for Personalized Recommendation
Ensemble Contextual Bandits for Personalized RecommendationEnsemble Contextual Bandits for Personalized Recommendation
Ensemble Contextual Bandits for Personalized Recommendation
 
Multi Armed Bandits and Optimized Online Marketing
Multi Armed Bandits and Optimized Online MarketingMulti Armed Bandits and Optimized Online Marketing
Multi Armed Bandits and Optimized Online Marketing
 
Optimized Online Marketing in Facebook (Smartly.io)
Optimized Online Marketing in Facebook (Smartly.io)Optimized Online Marketing in Facebook (Smartly.io)
Optimized Online Marketing in Facebook (Smartly.io)
 
Improving experimentation velocity via Multi-Armed Bandits
Improving experimentation velocity via Multi-Armed BanditsImproving experimentation velocity via Multi-Armed Bandits
Improving experimentation velocity via Multi-Armed Bandits
 
A Multi-armed Bandit Approach to Online Spatial Task Assignment
A Multi-armed Bandit Approach to Online Spatial Task AssignmentA Multi-armed Bandit Approach to Online Spatial Task Assignment
A Multi-armed Bandit Approach to Online Spatial Task Assignment
 
multi-armed bandit
multi-armed banditmulti-armed bandit
multi-armed bandit
 
Feeling Lucky? Multi-armed Bandits for Ordering Judgements in Pooling-based E...
Feeling Lucky? Multi-armed Bandits for Ordering Judgements in Pooling-based E...Feeling Lucky? Multi-armed Bandits for Ordering Judgements in Pooling-based E...
Feeling Lucky? Multi-armed Bandits for Ordering Judgements in Pooling-based E...
 
Olrac SPS Predictive Insurance Solutions
Olrac SPS Predictive Insurance SolutionsOlrac SPS Predictive Insurance Solutions
Olrac SPS Predictive Insurance Solutions
 
Combining Linear and Non Linear Modeling Techniques
Combining Linear and Non Linear Modeling Techniques Combining Linear and Non Linear Modeling Techniques
Combining Linear and Non Linear Modeling Techniques
 
The Robos Are Coming - How AI will revolutionize Insurance 0117
The Robos Are Coming - How AI will revolutionize Insurance 0117The Robos Are Coming - How AI will revolutionize Insurance 0117
The Robos Are Coming - How AI will revolutionize Insurance 0117
 
How to use R in different professions: R for Car Insurance Product (Speaker: ...
How to use R in different professions: R for Car Insurance Product (Speaker: ...How to use R in different professions: R for Car Insurance Product (Speaker: ...
How to use R in different professions: R for Car Insurance Product (Speaker: ...
 
Conductrics bandit basicsemetrics1016
Conductrics bandit basicsemetrics1016Conductrics bandit basicsemetrics1016
Conductrics bandit basicsemetrics1016
 
Predictive Modeling in Underwriting
Predictive Modeling in UnderwritingPredictive Modeling in Underwriting
Predictive Modeling in Underwriting
 
Facebook bids, budgets & optimization
Facebook bids, budgets & optimizationFacebook bids, budgets & optimization
Facebook bids, budgets & optimization
 
Uplift Modeling Workshop
Uplift Modeling WorkshopUplift Modeling Workshop
Uplift Modeling Workshop
 
Advanced Pricing in General Insurance
Advanced Pricing in General InsuranceAdvanced Pricing in General Insurance
Advanced Pricing in General Insurance
 
Actuarial Analytics in R
Actuarial Analytics in RActuarial Analytics in R
Actuarial Analytics in R
 
Princing insurance contracts with R
Princing insurance contracts with RPrincing insurance contracts with R
Princing insurance contracts with R
 

Similar to Multi-Armed Bandits:
 Intro, examples and tricks

An Introduction to Supervised Machine Learning and Pattern Classification: Th...
An Introduction to Supervised Machine Learning and Pattern Classification: Th...An Introduction to Supervised Machine Learning and Pattern Classification: Th...
An Introduction to Supervised Machine Learning and Pattern Classification: Th...Sebastian Raschka
 
Exploring temporal graph data with Python: 
a study on tensor decomposition o...
Exploring temporal graph data with Python: 
a study on tensor decomposition o...Exploring temporal graph data with Python: 
a study on tensor decomposition o...
Exploring temporal graph data with Python: 
a study on tensor decomposition o...André Panisson
 
Islamic University Pattern Recognition & Neural Network 2019
Islamic University Pattern Recognition & Neural Network 2019 Islamic University Pattern Recognition & Neural Network 2019
Islamic University Pattern Recognition & Neural Network 2019 Rakibul Hasan Pranto
 
Complex models in ecology: challenges and solutions
Complex models in ecology: challenges and solutionsComplex models in ecology: challenges and solutions
Complex models in ecology: challenges and solutionsPeter Solymos
 
Hewahi, saad 2006 - class outliers mining distance-based approach
Hewahi, saad   2006 - class outliers mining distance-based approachHewahi, saad   2006 - class outliers mining distance-based approach
Hewahi, saad 2006 - class outliers mining distance-based approachMotaz Saad
 
A Tree Kernel based approach for clone detection
A Tree Kernel based approach for clone detectionA Tree Kernel based approach for clone detection
A Tree Kernel based approach for clone detectionValerio Maggio
 
A tree kernel based approach for clone detection
A tree kernel based approach for clone detectionA tree kernel based approach for clone detection
A tree kernel based approach for clone detectionICSM 2010
 
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular AutomataCost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automataijait
 
A linear-Discriminant-Analysis-Based Approach to Enhance the Performance of F...
A linear-Discriminant-Analysis-Based Approach to Enhance the Performance of F...A linear-Discriminant-Analysis-Based Approach to Enhance the Performance of F...
A linear-Discriminant-Analysis-Based Approach to Enhance the Performance of F...CSCJournals
 
Deep Learning, Keras, and TensorFlow
Deep Learning, Keras, and TensorFlowDeep Learning, Keras, and TensorFlow
Deep Learning, Keras, and TensorFlowOswald Campesato
 
Cuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An IntroductionCuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An IntroductionXin-She Yang
 
Abductive commonsense reasoning
Abductive commonsense reasoningAbductive commonsense reasoning
Abductive commonsense reasoningSan Kim
 
Machine Learning ebook.pdf
Machine Learning ebook.pdfMachine Learning ebook.pdf
Machine Learning ebook.pdfHODIT12
 
Similarity Features, and their Role in Concept Alignment Learning
Similarity Features, and their Role in Concept Alignment Learning Similarity Features, and their Role in Concept Alignment Learning
Similarity Features, and their Role in Concept Alignment Learning Shenghui Wang
 
Finding similar items in high dimensional spaces locality sensitive hashing
Finding similar items in high dimensional spaces  locality sensitive hashingFinding similar items in high dimensional spaces  locality sensitive hashing
Finding similar items in high dimensional spaces locality sensitive hashingDmitriy Selivanov
 
Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...
Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...
Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...Mail.ru Group
 

Similar to Multi-Armed Bandits:
 Intro, examples and tricks (20)

An Introduction to Supervised Machine Learning and Pattern Classification: Th...
An Introduction to Supervised Machine Learning and Pattern Classification: Th...An Introduction to Supervised Machine Learning and Pattern Classification: Th...
An Introduction to Supervised Machine Learning and Pattern Classification: Th...
 
Exploring temporal graph data with Python: 
a study on tensor decomposition o...
Exploring temporal graph data with Python: 
a study on tensor decomposition o...Exploring temporal graph data with Python: 
a study on tensor decomposition o...
Exploring temporal graph data with Python: 
a study on tensor decomposition o...
 
Islamic University Pattern Recognition & Neural Network 2019
Islamic University Pattern Recognition & Neural Network 2019 Islamic University Pattern Recognition & Neural Network 2019
Islamic University Pattern Recognition & Neural Network 2019
 
tutorial.ppt
tutorial.ppttutorial.ppt
tutorial.ppt
 
Complex models in ecology: challenges and solutions
Complex models in ecology: challenges and solutionsComplex models in ecology: challenges and solutions
Complex models in ecology: challenges and solutions
 
Hewahi, saad 2006 - class outliers mining distance-based approach
Hewahi, saad   2006 - class outliers mining distance-based approachHewahi, saad   2006 - class outliers mining distance-based approach
Hewahi, saad 2006 - class outliers mining distance-based approach
 
A Tree Kernel based approach for clone detection
A Tree Kernel based approach for clone detectionA Tree Kernel based approach for clone detection
A Tree Kernel based approach for clone detection
 
A tree kernel based approach for clone detection
A tree kernel based approach for clone detectionA tree kernel based approach for clone detection
A tree kernel based approach for clone detection
 
Java and Deep Learning
Java and Deep LearningJava and Deep Learning
Java and Deep Learning
 
My7class
My7classMy7class
My7class
 
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular AutomataCost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
 
A linear-Discriminant-Analysis-Based Approach to Enhance the Performance of F...
A linear-Discriminant-Analysis-Based Approach to Enhance the Performance of F...A linear-Discriminant-Analysis-Based Approach to Enhance the Performance of F...
A linear-Discriminant-Analysis-Based Approach to Enhance the Performance of F...
 
Deep Learning, Keras, and TensorFlow
Deep Learning, Keras, and TensorFlowDeep Learning, Keras, and TensorFlow
Deep Learning, Keras, and TensorFlow
 
Cuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An IntroductionCuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An Introduction
 
Abductive commonsense reasoning
Abductive commonsense reasoningAbductive commonsense reasoning
Abductive commonsense reasoning
 
Machine Learning ebook.pdf
Machine Learning ebook.pdfMachine Learning ebook.pdf
Machine Learning ebook.pdf
 
Similarity Features, and their Role in Concept Alignment Learning
Similarity Features, and their Role in Concept Alignment Learning Similarity Features, and their Role in Concept Alignment Learning
Similarity Features, and their Role in Concept Alignment Learning
 
PhD defense talk slides
PhD  defense talk slidesPhD  defense talk slides
PhD defense talk slides
 
Finding similar items in high dimensional spaces locality sensitive hashing
Finding similar items in high dimensional spaces  locality sensitive hashingFinding similar items in high dimensional spaces  locality sensitive hashing
Finding similar items in high dimensional spaces locality sensitive hashing
 
Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...
Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...
Дмитрий Селиванов, OK.RU. Finding Similar Items in high-dimensional spaces: L...
 

More from Ilias Flaounas

The story of the Product Growth team at Atlassian
The story of the Product Growth team at AtlassianThe story of the Product Growth team at Atlassian
The story of the Product Growth team at AtlassianIlias Flaounas
 
Readability and Linguistic Subjectivity of News
Readability and Linguistic Subjectivity of NewsReadability and Linguistic Subjectivity of News
Readability and Linguistic Subjectivity of NewsIlias Flaounas
 
Detecting macro-patterns in the EU media sphere
Detecting macro-patterns in the EU media sphereDetecting macro-patterns in the EU media sphere
Detecting macro-patterns in the EU media sphereIlias Flaounas
 
Detecting Patterns in News Media Content
Detecting Patterns in News Media ContentDetecting Patterns in News Media Content
Detecting Patterns in News Media ContentIlias Flaounas
 
Celebrity Watch: Browsing News Content by Exploiting Social Intelligence
Celebrity Watch: Browsing News Content by Exploiting Social IntelligenceCelebrity Watch: Browsing News Content by Exploiting Social Intelligence
Celebrity Watch: Browsing News Content by Exploiting Social IntelligenceIlias Flaounas
 
ECML/PKDD 2009: Found in translation
ECML/PKDD 2009: Found in translationECML/PKDD 2009: Found in translation
ECML/PKDD 2009: Found in translationIlias Flaounas
 
Data Science at Atlassian: 
The transition towards a data-driven organisation
Data Science at Atlassian: 
The transition towards a data-driven organisationData Science at Atlassian: 
The transition towards a data-driven organisation
Data Science at Atlassian: 
The transition towards a data-driven organisationIlias Flaounas
 
Inference and validation of networks
Inference and validation of networksInference and validation of networks
Inference and validation of networksIlias Flaounas
 

More from Ilias Flaounas (9)

The story of the Product Growth team at Atlassian
The story of the Product Growth team at AtlassianThe story of the Product Growth team at Atlassian
The story of the Product Growth team at Atlassian
 
On Storing Big Data
On Storing Big DataOn Storing Big Data
On Storing Big Data
 
Readability and Linguistic Subjectivity of News
Readability and Linguistic Subjectivity of NewsReadability and Linguistic Subjectivity of News
Readability and Linguistic Subjectivity of News
 
Detecting macro-patterns in the EU media sphere
Detecting macro-patterns in the EU media sphereDetecting macro-patterns in the EU media sphere
Detecting macro-patterns in the EU media sphere
 
Detecting Patterns in News Media Content
Detecting Patterns in News Media ContentDetecting Patterns in News Media Content
Detecting Patterns in News Media Content
 
Celebrity Watch: Browsing News Content by Exploiting Social Intelligence
Celebrity Watch: Browsing News Content by Exploiting Social IntelligenceCelebrity Watch: Browsing News Content by Exploiting Social Intelligence
Celebrity Watch: Browsing News Content by Exploiting Social Intelligence
 
ECML/PKDD 2009: Found in translation
ECML/PKDD 2009: Found in translationECML/PKDD 2009: Found in translation
ECML/PKDD 2009: Found in translation
 
Data Science at Atlassian: 
The transition towards a data-driven organisation
Data Science at Atlassian: 
The transition towards a data-driven organisationData Science at Atlassian: 
The transition towards a data-driven organisation
Data Science at Atlassian: 
The transition towards a data-driven organisation
 
Inference and validation of networks
Inference and validation of networksInference and validation of networks
Inference and validation of networks
 

Recently uploaded

convolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfconvolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfSubhamKumar3239
 
Digital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksDigital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksdeepakthakur548787
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Thomas Poetter
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxMike Bennett
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our WorldEduminds Learning
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Seán Kennedy
 
Unveiling the Role of Social Media Suspect Investigators in Preventing Online...
Unveiling the Role of Social Media Suspect Investigators in Preventing Online...Unveiling the Role of Social Media Suspect Investigators in Preventing Online...
Unveiling the Role of Social Media Suspect Investigators in Preventing Online...Milind Agarwal
 
INTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processingINTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processingsocarem879
 
Networking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptxNetworking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptxHimangsuNath
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxTasha Penwell
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Seán Kennedy
 
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...KarteekMane1
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxHaritikaChhatwal1
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesTimothy Spann
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
English-8-Q4-W3-Synthesizing-Essential-Information-From-Various-Sources-1.pdf
English-8-Q4-W3-Synthesizing-Essential-Information-From-Various-Sources-1.pdfEnglish-8-Q4-W3-Synthesizing-Essential-Information-From-Various-Sources-1.pdf
English-8-Q4-W3-Synthesizing-Essential-Information-From-Various-Sources-1.pdfblazblazml
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Boston Institute of Analytics
 

Recently uploaded (20)

convolutional neural network and its applications.pdf
convolutional neural network and its applications.pdfconvolutional neural network and its applications.pdf
convolutional neural network and its applications.pdf
 
Digital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing worksDigital Marketing Plan, how digital marketing works
Digital Marketing Plan, how digital marketing works
 
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
Minimizing AI Hallucinations/Confabulations and the Path towards AGI with Exa...
 
Semantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptxSemantic Shed - Squashing and Squeezing.pptx
Semantic Shed - Squashing and Squeezing.pptx
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our World
 
Data Analysis Project: Stroke Prediction
Data Analysis Project: Stroke PredictionData Analysis Project: Stroke Prediction
Data Analysis Project: Stroke Prediction
 
Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...Student Profile Sample report on improving academic performance by uniting gr...
Student Profile Sample report on improving academic performance by uniting gr...
 
Unveiling the Role of Social Media Suspect Investigators in Preventing Online...
Unveiling the Role of Social Media Suspect Investigators in Preventing Online...Unveiling the Role of Social Media Suspect Investigators in Preventing Online...
Unveiling the Role of Social Media Suspect Investigators in Preventing Online...
 
INTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processingINTRODUCTION TO Natural language processing
INTRODUCTION TO Natural language processing
 
Networking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptxNetworking Case Study prepared by teacher.pptx
Networking Case Study prepared by teacher.pptx
 
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptxThe Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
The Power of Data-Driven Storytelling_ Unveiling the Layers of Insight.pptx
 
Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...Student profile product demonstration on grades, ability, well-being and mind...
Student profile product demonstration on grades, ability, well-being and mind...
 
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
wepik-insightful-infographics-a-data-visualization-overview-20240401133220kwr...
 
SMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptxSMOTE and K-Fold Cross Validation-Presentation.pptx
SMOTE and K-Fold Cross Validation-Presentation.pptx
 
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming PipelinesConf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
Conf42-LLM_Adding Generative AI to Real-Time Streaming Pipelines
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
English-8-Q4-W3-Synthesizing-Essential-Information-From-Various-Sources-1.pdf
English-8-Q4-W3-Synthesizing-Essential-Information-From-Various-Sources-1.pdfEnglish-8-Q4-W3-Synthesizing-Essential-Information-From-Various-Sources-1.pdf
English-8-Q4-W3-Synthesizing-Essential-Information-From-Various-Sources-1.pdf
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
Data Analysis Project Presentation: Unveiling Your Ideal Customer, Bank Custo...
 

Multi-Armed Bandits:
 Intro, examples and tricks

  • 1. Multi-Armed Bandits:
 Intro, examples and tricks Dr Ilias Flaounas Senior Data Scientist at Atlassian Data Science Sydney meetup 22 March 2016
  • 2. Motivation Increase awareness of some very useful but less known techniques Demo some current work at Atlassian Connect it with some research from my past Hopefully, there will be something useful for everybody — apologies for the few equations and loose notation
  • 3.
  • 5. ( rA,1 ) ( rC,2 ) rB,3 + rA,4 + rA,5 + rC,6 + rA,7 / nA + rC,8 / nB / nc µA = µB = µC =
  • 6. 1. e-greedy: the best arm is selected for a proportion of 1-e of the trials and a random arm in e trials. 2. e-greedy with variable e 3. Pure exploration first, then pure exploitation. 4. … 5. Thompson sampling
 (Draw from the estimated beta-distrom 6. Upper Confidence Bound (UCB) Many solutions…
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Disadvantages Reaching significance for non-winning arms takes longer Unclear stopping criteria
 Hard to order non-winning arms and assess reliably their impact Advantages Reaching significance for the winning arm is faster
 Best arm can change over time There are no false positives in the long term

  • 16. Optimizely recently introduced MAB rebranded as: 
 “Traffic auto-allocation”
  • 17. Let’s add some context What happens if we want to assess 100 variations? How about 1,000 or 10,000 variations?
  • 18. Contextual Multi-Armed Bandits rA, t = f(xA,1, xA,2, xA,3…)A -> {xA,1, xA,2, xA,3…} rB,t = f(xB,1, xB,2, xB,3…) rC,t = f(xC,1, xC,2, xC,3…) Experiment parameters, e.g., price, 
 #users, product, bundles, colour of UI elements… B -> {xB,1, xB,2, xB,3…} C -> {xC,1, xC,2, xC,3…}
  • 19. We introduce a notion of proximity or similarity between arms A -> {xA,1, xA,2, xA,3…} B -> {xB,1, xB,2, xB,3…} Contextual Multi-Armed Bandits
  • 20. LinUCB L. Li, W. Chu, J. Langford, R. E. Schapire, “A Contextual-Bandit Approach to Personalized News Article Recommendation”, WWW, 2010. The UCB is some expectation plus some confidence level: µ↵(t) + ↵(t) We assume there is some unknown vector θ∗, the same for each arm, 
 for which: E[ra,t|xa,t] = xT a,t✓⇤
  • 21. ˆ✓t := C 1 t XT t yt Xt := {xa(1),1, xa(2),2, . . . , xa(t),t}T yt := {ra(1),1, ra(2),2, . . . , ra(t),t}T Ct := XT t Xt Using least squares: ˆµa(t) := xT a,t ˆ✓t E[ra,t|xa,t] = xT a,t✓⇤ µ↵(t) + ↵(t) ˆµa := xT a,tC 1 t XT t yt
  • 22. The upper confidence bound is some expectation plus some confidence level: µ↵(t) + ↵(t) ˆ(t) := q xT a,tC 1 t xa,tˆµa := xT a,tC 1 t XT t yt
  • 23. L. Li, W. Chu, J. Langford, R. E. Schapire, A Contextual-Bandit Approach to Personalized News Article Recommendation, WWW, 2010.
  • 25. • How can we locate the city of Bristol from tweets? • 10K candidate locations organised in a 100x100 grid • At every step we get tweets from one location and count mentions of “Bristol” • Challenge: find the target in sub-linear time complexity!
  • 26. Linear methods fail on this problem. How can we go non-linear?
  • 27. John-Shawe Taylor & Nello Cristianini, “Kernel Methods for Pattern Analysis”, Cambridge University press, 2004. The Kernel trick! —no, it’s not just for SVMs
  • 28. ˆµa(t) := xT a,t ˆ✓t ˆµa(t) = kT x,tK 1 t yt ˆa(t) = q tkT x,tK 2 t kx,tˆ(t) := q xT a,tC 1 t xa,t Ct := XT t Xt Kt = XtXT t LinUCB: M. Valko, N. Korda, R. Munos, I. Flaounas, N. Cristianini, “Finite-Time Analysis of Kernelised Contextual Bandits”, UAI, 2013. KernelUCB:
  • 29. • The last few steps of the algorithm before it locates Bristol. • KernelUCB with RBF kernel converges after ~300 iterations (instead of >>10K).
  • 30. Target is the red dot. We locate it using KernelUCB with RBF kernel. KernelUCB code: http://www.complacs.org/pmwiki.php/CompLACS/KernelUCB
  • 31. What if we have a high-dimensional space? Hashing trick Implementation in Vowpal Wabbit, 
 by J. Langford, et al.
  • 32.
  • 33. References M. Valko, N. Korda, R. Munos, I. Flaounas, N. Cristianini, “Finite-Time Analysis of Kernelised Contextual Bandits”, UAI, 2013. L. Li, W. Chu, J. Langford, R. E. Schapire, “A Contextual-Bandit Approach to Personalized News Article Recommendation”, WWW, 2010. John-Shawe Taylor & Nello Cristianini, “Kernel Methods for Pattern Analysis”, Cambridge University press, 2004. Implementation of KernelUCB in Complacs toolkit:
 http://www.complacs.org/pmwiki.php/CompLACS/KernelUCB https://en.wikipedia.org/wiki/Multi-armed_bandit https://github.com/JohnLangford/vowpal_wabbit/wiki/Contextual-Bandit-Example
  • 34. Thank you - We are hiring! Dr Ilias Flaounas Senior Data Scientist <first>.<last>@atlassian.com