Multi-armed bandit algorithms - Epsilon greedy algorithm

Sophia Yang · Intermediate ·🎮 Reinforcement Learning ·4y ago

Key Takeaways

Explains the epsilon greedy algorithm for multi-armed bandit problems in reinforcement learning

Full Transcript

previously we talked about the etc algorithm for the multi-armed bandit problem the epsilon greedy algorithm is a randomized relative of etc the algorithm is described as follows first it chooses each arm once and then subsequently in each round t it chooses empirically best arm with probability one minus epsilon otherwise it chooses an arm uniformly at random let's take a look at an example with two arms let's assume the rewards for these two arms are one subgaussian with a mean of 0.9 and 0.6 we first play each arm once at the third round we know that with the probability 1 minus epsilon we choose the empirically best arm and with probability epsilon we choose a norm at random in this example let's assume epsilon three equals one which means that we have a hundred percent of chance choosing an arm and random here in this example we randomly choose arm 2. now assume at round 4 epsilon 4 is 0.9 which means that with 90 probability we choose an arm at random and ten percent probability we choose the best arm how do we choose let's get a random number from this random number generator here we get point four eight we see that the random number is smaller than epsilon 4 thus we choose an arm at random again this time we choose arm 1. at round 5 assume epsilon 5 is 0.5 which means half of the chance we should choose the best arm half of the chance we should select an arm at random again we use the random number generator to get a random number 0.8 which is greater than 0.5 therefore this time we need to choose the empirically best arm how do we find the best arm let's assume that in the previous four rounds we played arm one gives us a reward of 0.9 arm 2 gives us 0.5 and then arm 2 gives us 0.3 and arm 1 gives us 0.7 the empirical mean estimate for arm 1 is 0.8 and for arm 2 is 0.4 which you play arm one and then we just repeat this whole process over and over again to write this algorithm formally we have action a at time t expressed as follows it is the arg max of the programming estimate with probability y minus epsilon and the uniform selection of an arm with the probability epsilon note that we need to calculate epsilon at each round at epsilon is a function of c k p and delta c is a constant number k is the number of arms p is the number of the current round delta mean is the minimum of mean rewards difference among arms in our example with two arms this delta mean is simply the difference of the main rewards between our two arms so that is the epsilon greedy algorithm for a multi-armed bandit problem

Original Description

Hi, I plan to make a series of videos on the multi-armed bandit algorithms. Here is the second one: Epsilon greedy algorithm :) Previous video on Explore-Then-Commit: https://www.youtube.com/watch?v=r5oz7by90-Y 📖 Ref: https://tor-lattimore.com/downloads/b... https://web.mit.edu/6.246/www/lecture... ⭐ Stay in touch: Medium: https://sophiamyang.medium.com/ Twitter: https://twitter.com/sophiamyang Linkedin: https://www.linkedin.com/in/sophiamyang/
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Sophia Yang · Sophia Yang · 9 of 60

1 Customer lifetime value in a discrete-time contractual setting (math and Python implementation)
Customer lifetime value in a discrete-time contractual setting (math and Python implementation)
Sophia Yang
2 Time series analysis using Prophet in Python — Math explained
Time series analysis using Prophet in Python — Math explained
Sophia Yang
3 Multiclass logistic/softmax regression from scratch
Multiclass logistic/softmax regression from scratch
Sophia Yang
4 Deploy a Python Visualization Panel App to Google Cloud App Engine
Deploy a Python Visualization Panel App to Google Cloud App Engine
Sophia Yang
5 Deploy a Python Visualization Panel App to Google Cloud Run
Deploy a Python Visualization Panel App to Google Cloud Run
Sophia Yang
6 [Read a paper (with code)] Beyond Accuracy: Behavioral Testing of NLP models with CheckList
[Read a paper (with code)] Beyond Accuracy: Behavioral Testing of NLP models with CheckList
Sophia Yang
7 5-step data science workflow
5-step data science workflow
Sophia Yang
8 Multi-armed bandit algorithms - ETC Explore then Commit
Multi-armed bandit algorithms - ETC Explore then Commit
Sophia Yang
Multi-armed bandit algorithms - Epsilon greedy algorithm
Multi-armed bandit algorithms - Epsilon greedy algorithm
Sophia Yang
10 User retention analysis framework | data science product sense
User retention analysis framework | data science product sense
Sophia Yang
11 Visualization and Interactive Dashboard in Python: My favorite Python Viz tools — HoloViz
Visualization and Interactive Dashboard in Python: My favorite Python Viz tools — HoloViz
Sophia Yang
12 Multi-armed bandit algorithms: Thompson Sampling
Multi-armed bandit algorithms: Thompson Sampling
Sophia Yang
13 The Easiest Way to Create an Interactive Dashboard in Python
The Easiest Way to Create an Interactive Dashboard in Python
Sophia Yang
14 Big Data Visualization Using Datashader in Python | How does Datashader work and why is it so fast?
Big Data Visualization Using Datashader in Python | How does Datashader work and why is it so fast?
Sophia Yang
15 Why do you want to be a data scientist? Don't be a data scientist if ...
Why do you want to be a data scientist? Don't be a data scientist if ...
Sophia Yang
16 Johnny Depp v Amber Heard Twitter Sentiment Analysis | Is Camille Vasquez the real winner | 🤗 NLP
Johnny Depp v Amber Heard Twitter Sentiment Analysis | Is Camille Vasquez the real winner | 🤗 NLP
Sophia Yang
17 How to build a product that sells itself | Product-led Growth | Book Summary | Read a book with me
How to build a product that sells itself | Product-led Growth | Book Summary | Read a book with me
Sophia Yang
18 Designing Machine Learning Systems | book summary | Read a book with me
Designing Machine Learning Systems | book summary | Read a book with me
Sophia Yang
19 Where do data scientists/analysts go next? Love and hate in data analytics (ft. Shashank Kalanithi)
Where do data scientists/analysts go next? Love and hate in data analytics (ft. Shashank Kalanithi)
Sophia Yang
20 Meet the Author: Fundamentals of Data Engineering | DS/ML book club
Meet the Author: Fundamentals of Data Engineering | DS/ML book club
Sophia Yang
21 What's new in hvPlot releases 0.8.0 & 0.8.1?
What's new in hvPlot releases 0.8.0 & 0.8.1?
Sophia Yang
22 Meet the Author: Machine Learning Design Patterns | What do ML/Research Engineers do at Google?
Meet the Author: Machine Learning Design Patterns | What do ML/Research Engineers do at Google?
Sophia Yang
23 Machine Learning Design Patterns | Google Executive | Investor | Meet the Author
Machine Learning Design Patterns | Google Executive | Investor | Meet the Author
Sophia Yang
24 How to solve data quality issues | Data Reliability | Meet the Author
How to solve data quality issues | Data Reliability | Meet the Author
Sophia Yang
25 Reliable Machine Learning author interview | DS/ML book club
Reliable Machine Learning author interview | DS/ML book club
Sophia Yang
26 Toronto VLOG | First vlog | Meet my favorite author | Toronto ML Summit conference
Toronto VLOG | First vlog | Meet my favorite author | Toronto ML Summit conference
Sophia Yang
27 TOP 6 tech news in 2022 #shorts
TOP 6 tech news in 2022 #shorts
Sophia Yang
28 How to deploy a Panel app to Hugging Face using Docker?
How to deploy a Panel app to Hugging Face using Docker?
Sophia Yang
29 Tech news this week | ChatGPT, Hacks, Snowflake, CES #shorts
Tech news this week | ChatGPT, Hacks, Snowflake, CES #shorts
Sophia Yang
30 🗞️ Tech news this week: ChatGPT, DreamerV3, Muse, VALL-E, Mineral, DoNotPay, Tesla, SBF... #shorts
🗞️ Tech news this week: ChatGPT, DreamerV3, Muse, VALL-E, Mineral, DoNotPay, Tesla, SBF... #shorts
Sophia Yang
31 Tech news this week | Boston Dynamics, Microsoft, Snowflake, Google, and more #shorts
Tech news this week | Boston Dynamics, Microsoft, Snowflake, Google, and more #shorts
Sophia Yang
32 The story of Metaflow | Effective Data Science Infrastructure | Book author interview
The story of Metaflow | Effective Data Science Infrastructure | Book author interview
Sophia Yang
33 Tech news this week #shorts
Tech news this week #shorts
Sophia Yang
34 A day in life of a data scientist | Data Day Texas | Interview 12 authors/speakers
A day in life of a data scientist | Data Day Texas | Interview 12 authors/speakers
Sophia Yang
35 Tech news this week #shorts
Tech news this week #shorts
Sophia Yang
36 Explainable AI with Shapley Values (Part 1: Game Theory)
Explainable AI with Shapley Values (Part 1: Game Theory)
Sophia Yang
37 Explainable AI with Shapley Values (Part 2: Estimate Shapley Values)
Explainable AI with Shapley Values (Part 2: Estimate Shapley Values)
Sophia Yang
38 Explainable AI with Shapley Values (Part 3: KernelSHAP)
Explainable AI with Shapley Values (Part 3: KernelSHAP)
Sophia Yang
39 Tech news this week | AI search war between Microsoft and Google #shorts
Tech news this week | AI search war between Microsoft and Google #shorts
Sophia Yang
40 The Story of ChatGPT's creator OpenAI | From Riches to Fame
The Story of ChatGPT's creator OpenAI | From Riches to Fame
Sophia Yang
41 Explainable AI for Practitioners | Must-read for XAI | author interview
Explainable AI for Practitioners | Must-read for XAI | author interview
Sophia Yang
42 Train your own language model with nanoGPT | Let’s build a songwriter
Train your own language model with nanoGPT | Let’s build a songwriter
Sophia Yang
43 The easiest way to work with large language models | Learn LangChain in 10min
The easiest way to work with large language models | Learn LangChain in 10min
Sophia Yang
44 The BEST browser? AI article summary, image generation, website insights. Microsoft Edge Copilot!
The BEST browser? AI article summary, image generation, website insights. Microsoft Edge Copilot!
Sophia Yang
45 startup scene in data | insights from 50+ data startups from Data Council
startup scene in data | insights from 50+ data startups from Data Council
Sophia Yang
46 NLP with Transformers author interview with Lewis Tunstall from Hugging Face
NLP with Transformers author interview with Lewis Tunstall from Hugging Face
Sophia Yang
47 4 ways to do question answering in LangChain | chat with long PDF docs | BEST method
4 ways to do question answering in LangChain | chat with long PDF docs | BEST method
Sophia Yang
48 5 Steps to Build a Question Answering PDF Chatbot: LangChain + OpenAI + Panel + HuggingFace.
5 Steps to Build a Question Answering PDF Chatbot: LangChain + OpenAI + Panel + HuggingFace.
Sophia Yang
49 4 Autonomous AI Agents: “Westworld” simulation, Camel, BabyAGI, AutoGPT, Camel ⭐ LangChain ⭐
4 Autonomous AI Agents: “Westworld” simulation, Camel, BabyAGI, AutoGPT, Camel ⭐ LangChain ⭐
Sophia Yang
50 MiniGPT4: image understanding & open-source!
MiniGPT4: image understanding & open-source!
Sophia Yang
51 BEST Practices in Prompt Engineering: Learnings and Thoughts from Andrew Ng's New Course
BEST Practices in Prompt Engineering: Learnings and Thoughts from Andrew Ng's New Course
Sophia Yang
52 Designing Machine Learning Systems author interview with Chip Huyen
Designing Machine Learning Systems author interview with Chip Huyen
Sophia Yang
53 Tech news this week: code interpreter, Mojo, Redpajama, MPT7b, StarCoder #shorts
Tech news this week: code interpreter, Mojo, Redpajama, MPT7b, StarCoder #shorts
Sophia Yang
54 🤗 Hugging Face Transformers Agent | LangChain comparisons
🤗 Hugging Face Transformers Agent | LangChain comparisons
Sophia Yang
55 📢 Tech news this week #shorts
📢 Tech news this week #shorts
Sophia Yang
56 📢 Tech news this week #shorts
📢 Tech news this week #shorts
Sophia Yang
57 The BEST ChatGPT Plugins | Brand NEW Bing Search | Web browsing, CODING, summarizing, and more
The BEST ChatGPT Plugins | Brand NEW Bing Search | Web browsing, CODING, summarizing, and more
Sophia Yang
58 Tech news this week #shorts #short
Tech news this week #shorts #short
Sophia Yang
59 📢 Tech news this week #shorts
📢 Tech news this week #shorts
Sophia Yang
60 Deep Learning with PyTorch Author Interview with Eli Stevens, Luca Antiga, and Thomas Viehmann
Deep Learning with PyTorch Author Interview with Eli Stevens, Luca Antiga, and Thomas Viehmann
Sophia Yang

Related AI Lessons

Proximal Policy Optimisation — The Clip That Made Policy Gradients Reliable
Learn how Proximal Policy Optimisation (PPO) makes policy gradients reliable in reinforcement learning
Medium · Machine Learning
Deep Q-Networks — When the Q-Table Won’t Fit
Learn to implement Deep Q-Networks in Python for reinforcement learning problems where the Q-table won't fit, and understand their benefits over traditional Q-learning
Medium · Python
Reward hacking in Reinforcement learning
Learn to identify and fix reward hacking in Reinforcement Learning, a crucial step in ensuring reliable AI decision-making
Medium · LLM
Learning by messing up: A beginner’s tour of Reinforcement Learning
Learn the basics of Reinforcement Learning, from agents and rewards to the Markov property and Gym environments, and start building your own RL projects
Medium · Deep Learning
Up next
Middle Management Meritocracy: Shockingly Naive
iBankerU
Watch →