Online Learning Model. Motivation Many situations involve online repeated decision making in an uncertain environment. Deciding how to invest your money.

Slides:



Advertisements
Similar presentations
Ulams Game and Universal Communications Using Feedback Ofer Shayevitz June 2006.
Advertisements

Primal Dual Combinatorial Algorithms Qihui Zhu May 11, 2009.
Online Learning for Online Pricing Problems Maria Florina Balcan.
Lecturer: Moni Naor Algorithmic Game Theory Uri Feige Robi Krauthgamer Moni Naor Lecture 8: Regret Minimization.
Online learning, minimizing regret, and combining expert advice
Follow the regularized leader
Online Learning Avrim Blum Carnegie Mellon University Your guide: [Machine Learning Summer School 2012]
Machine Learning Theory Machine Learning Theory Maria Florina Balcan 04/29/10 Plan for today: - problem of “combining expert advice” - course retrospective.
Boosting Approach to ML
Games of Prediction or Things get simpler as Yoav Freund Banter Inc.
Quick Sort, Shell Sort, Counting Sort, Radix Sort AND Bucket Sort
A New Understanding of Prediction Markets via No-Regret Learning.
DAST 2005 Week 4 – Some Helpful Material Randomized Quick Sort & Lower bound & General remarks…
Machine Learning Rob Schapire Princeton Avrim Blum Carnegie Mellon Tommi Jaakkola MIT.
Experts and Boosting Algorithms. Experts: Motivation Given a set of experts –No prior information –No consistent behavior –Goal: Predict as the best expert.
Experts Learning and The Minimax Theorem for Zero-Sum Games Maria Florina Balcan December 8th 2011.
The Multiplicative Weights Update Method Based on Arora, Hazan & Kale (2005) Mashor Housh Oded Cats Advanced simulation methods Prof. Rubinstein.
Connections between Learning Theory, Game Theory, and Optimization Maria Florina (Nina) Balcan Lecture 2, August 26 th 2010.
Experts and Multiplicative Weights slides from Avrim Blum.
/0604 © Business & Legal Reports, Inc. BLR’s Training Presentations Effective Decision-Making Strategies.
CS 8751 ML & KDDComputational Learning Theory1 Notions of interest: efficiency, accuracy, complexity Probably, Approximately Correct (PAC) Learning Agnostic.
Instructor: Shengyu Zhang 1. Offline algorithms Almost all algorithms we encountered in this course assume that the entire input is given all at once.
Chapter 1 Algorithms with Numbers. Bases and Logs How many digits does it take to represent the number N >= 0 in base 2? With k digits the largest number.
On-Line Algorithms in Machine Learning By: WALEED ABDULWAHAB YAHYA AL-GOBI MUHAMMAD BURHAN HAFEZ KIM HYEONGCHEOL HE RUIDAN SHANG XINDI.
Money and Banking Lecture 10. Review of the Previous Lecture Application of Present Value Concept Compound Annual Rate Interest Rates vs Discount Rate.
PROBABILITY AND COMPUTING RANDOMIZED ALGORITHMS AND PROBABILISTIC ANALYSIS CHAPTER 1 IWAMA and ITO Lab. M1 Sakaidani Hikaru 1.
A Prime Example CS Lecture 20 A positive integer p  2 is prime if the only positive integers that divide p are 1 and p itself. Positive integers.
Introduction to Hypothesis Testing: The Binomial Test
Chapter 11 Sorting Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and Mount.
Introduction to Hypothesis Testing: The Binomial Test
Carnegie Mellon University
Section 2 Probability William Christensen, Ph.D..
Dealing with Random Phenomena
Introduction to Randomized Algorithms and the Probabilistic Method
Better Algorithms for Better Computers
Speaker: Dr. Michael Schapira Topic: Dynamics in Games (Part II)
The Boosting Approach to Machine Learning
Quicksort
Randomized Algorithms
Introduction to Hypothesis Testing: The Binomial Test
Classification with Perceptrons Reading:
The Boosting Approach to Machine Learning
Greedy Algorithms / Interval Scheduling Yin Tat Lee
Quicksort 1.
Multiple Choice Practice
Understanding Randomness
Game Theory.
Complexity Present sorting methods. Binary search. Other measures.
Randomized Algorithms CS648
Instructor: Shengyu Zhang
Stat 217 – Day 28 Review Stat 217.
Randomized Algorithms
CSCI B609: “Foundations of Data Science”
The
Presented By Aaron Roth
The Nonstochastic Multiarmed Bandit Problem
Honors Statistics From Randomness to Probability
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
WARM – UP A two sample t-test analyzing if there was a significant difference between the cholesterol level of men on a NEW medication vs. the traditional.
ML – Lecture 3B Deep NN.
Ensemble learning.
Quicksort.
Model Combination.
Warm Up Problem of the Day Lesson Presentation Lesson Quizzes.
Statistics and Probability-Part 6
From Randomness to Probability
The Weighted Majority Algorithm
Quicksort.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Evaluation David Kauchak CS 158 – Fall 2019.
Presentation transcript:

Online Learning Model

Motivation Many situations involve online repeated decision making in an uncertain environment. Deciding how to invest your money (buy or sell stocks) What route to drive to work each day Playing repeatedly a game against an opponent with unknown strategy

online learning model For online learning model, the learner gets one example at a time, and then make prediction. In other words, in online learning model,training and test happen at the same time. The goal is to minimize the number of mistakes. Some possible examples are weather forecast and stock market prediction. 3

Expert 1 Expert 2 Expert 3 Let's start with “learning with expert advice". For example, predict S&P500 based on expert advice. (See Table 1.) On each day, each expert predicts if the S&P500 will go up or down that day. Then the learner combines their predictions into its own prediction. Then at the end of the day, they find out if the market actually went up or down. This is repeated over a sequence of T days.

5 Goal: The number of the mistakes of the learner the number of the mistakes of the best expert + small amount (growing slowly compared to the number of days T). The " best expert" is, looking backward, who makes the least mistakes.

Using “expert” advice We solicit n “experts” for their advice. Can we do nearly as well as best in hindsight? We then want to use their advice somehow to make our prediction. E.g., Note: “expert” someone with an opinion. Will the market go up or down? [Not necessairly someone who knows anything.]

Formal model There are n experts. Can we do nearly as well as best in hindsight? Each expert makes a prediction in {0,1} For each round t=1,2, …, T The learner (using experts’ predictions) makes a prediction in {0,1} The learner observes the actual outcome. There is a mistake if the predicted outcome is different form the actual outcome. The learner gets to update his hypothesis.

Formal model There are n experts. Can we do nearly as well as best in hindsight? Each expert makes a prediction in {0,1} For each round t=1,2, …, T The learner (using experts’ predictions) makes a prediction in {0,1} The learner observes the actual outcome. There is a mistake if the predicted outcome is different form the actual outcome. We are not given any other info besides the yes/no bits produced by the experts. We make no assumptions about the quality or independence of the experts. We cannot hope to achieve an absolute level of quality in our predictions.

Simpler question We have n “experts”. Anybody makes a mistake, throw them out. this strategy that makes no more than lg(n) mistakes? One of these is perfect (never makes a mistake). We don’t know which one.

Halving algorithm Take majority vote over all experts that have been correct so far. I.e., if # surviving experts predicting 1 > # surviving experts predicting 0, then predict 1; else predict 0. Claim: If one of the experts is perfect, then at most lg(n) mistakes. Proof: W = number of experts with no mistakes so far. Initially, W = n. Each mistake cuts # surviving by factor of 2, so we make · lg(n) mistakes. Note: this means ok for n to be very large.

Using “expert” advice Proof. Learner makes a mistake )=> 1/2 surviving experts are wrong )=> 1/2 eliminated. After 1 mistake, W ≤ n/2; after 2 mistakes, W ≤ n/4;... after m mistakes, W ≤ n/2 m. So, m≤lgn But what if none is perfect? Can we do nearly as well as the best one in hindsight?

Using “expert” advice Strategy #1: Iterated halving algorithm. Makes at most lg(n)*[OPT+1] mistakes, where OPT is #mistakes of the best expert in hindsight. At the end of an epoch we have crossed all the experts, so every single expert must make a mistake. So, the best expert must have made a mistake. We make at most log n mistakes per epoch. Same as before, but once we've crossed off all the experts, restart from the beginning. Divide the whole history into epochs. Beginning of an epoch is when we restart Halving; end of an epoch is when we have crossed off all the available experts. If OPT=0 we get the previous guarantee.

Using “expert” advice Strategy #1: Iterated halving algorithm. Wasteful. Constantly forgetting what we've “learned”. Makes at most lg(n)*[OPT+1] mistakes, where OPT is #mistakes of the best expert in hindsight. Same as before, but once we've crossed off all the experts, restart from the beginning. Can we do better?

Weighted Majority Algorithm Instead of crossing off, just lower its weight. Key Point: A mistake doesn't completely disqualify an expert.

Weighted Majority Algorithm 15

Weighted Majority Algorithm For example, β=1/2,n=4

17

18

19

Analysis: do nearly as well as best expert in hindsight

The values of q0 and q1 in the weighted majority algorithm signify the learner's willingness to output 0 or 1, respectively, relative to the weights of experts. Instead of predicting according to the greater value of q0 or q1, we will predict 0 with probability q0=W and 1 with probability q1=W. 21

Randomized Weighted Majority Can we do better? Yes. Instead of taking majority vote, use weights as probabilities & predict each outcome with prob. ~ to its weight. (e.g., if 70% on up, 30% on down, then pick 70:30) Key Point: smooth out the worst case.

Randomized Weighted Majority Also, generalize ½ to 1- . Can we do better? Equivalent to select an expert with probability proportional with its weight. Yes. Instead of taking majority vote, use weights as probabilities. (e.g., if 70% on up, 30% on down, then pick 70:30)

24

Weighted Majority Algorithm 25

Formal Guarantee for Randomized Weighted Majority If M = expected # mistakes we've made so far and OPT = # mistakes best expert has made so far, then: Theorem: M ·  OPT + (1/  log(n)

Analysis Say at time t we have fraction F t of weight on experts that made mistake. i.e., For all t, F t is our expected loss at time t; probability we make a mistake at time t. Key idea: if the algo has significant expected loss, then the total weight must drop substantially.

Analysis Say at time t we have fraction F t of weight on experts that made mistake. So, we have probability F t of making a mistake, and we remove an  F t fraction of the total weight. –W final = n(1-  F 1 )(1 -  F 2 )… –ln(W final ) = ln(n) +  t [ln(1 -  F t )] · ln(n) -   t F t (using ln(1-x) < -x) = ln(n) -  M. (  F t = E[# mistakes]) If best expert makes OPT mistakes, ln(W final ) > ln((1-  ) OPT ). Now solve: ln(n) -  M > OPT ln(1-  ).

Randomized Weighted Majority Solves to:

Summarizing E[# mistakes] ·  OPT +  -1 log(n). If set  =(log(n)/OPT) 1/2 to balance the two terms out (or use guess-and-double), get bound of E[mistakes] · OPT+2(OPT ¢ log n) 1/2 Note: Of course we might not know OPT, so if running T time steps, since OPT · T, set ² to get additive loss (2T log n) 1/2 regret E[mistakes] · OPT+2(T ¢ log n) 1/2 So, regret/T ! 0. [no regret algorithm]

What if have n options, not n predictors? We’re not combining n experts, we’re choosing one. Can we still do it? Nice feature of RWM: can be applied when experts are n different options E.g., n different ways to drive to work each day, n different ways to invest our money.

Randomized Weighted Majority Note: Did not see the predictions to select an expert (only needed to see their losses to update our weights)

What if have n options, not n predictors? We’re not combining n experts, we’re choosing one. Can we still do it? Nice feature of RWM: can be applied when experts are n different options We did not see the predictions in order to select an expert (only needed to see their losses to update our weights) E.g., n different ways to drive to work each day, n different ways to invest our money.

Decision Theoretic Version; Formal model There are n experts. The guarantee also applies to this model!!! For each round t=1,2, …, T No predictions. The learner produces a prob distr. on experts based on their past performance p t. The learner is given a loss vector l t and incurs expected loss l t ¢ p t. The learner updates the weights. [Interesting for connections between GT and Learning.]

Can generalize to losses in [0,1] If expert i has loss l i, do: w i à w i (1-l i  ). [before if an expert had a loss of 1, we multiplied by (1-epsilon), if it had loss of 0 we left it alone, now we do linearly in between] Same analysis as before.

Summarizing E[# mistakes] ·  OPT +  -1 log(n). If set  =(log(n)/OPT) 1/2 to balance the two terms out (or use guess-and-double), get bound of E[mistakes] · OPT+2(OPT ¢ log n) 1/2 Note: Of course we might not know OPT, so if running T time steps, since OPT · T, set ² to get additive loss (2T log n) 1/2 regret E[mistakes] · OPT+2(T ¢ log n) 1/2 So, regret/T ! 0. [no regret algorithm]

Lower Bounds Consider T< log n. 9 a stochastic series of expert predictions and correct answers such that for any alg, we have E[#mistakes]=T/2 and yet the best expert makes 0 mistakes. At t=1, half the experts predict 0, half predict 1. Correct answer given by fair coin flip. At t=2, 3,… : of experts correct so far, half predict 0 and half predict 1. Correct answer given by fair coin flip. Any online algorithm incurs an expected loss of 1/2 at each time step. Yet, for T < log n there will always be some expert with 0 mistakes.

Lower Bounds Expert 1 always predicts 0. Expert 2 always predicts 1. Correct answer given by fair coin flip. Any online algorithm has 50% chance of predicting correctly at each time step, so expected loss of T/2. E(loss of best expert) = E(min(#heads, #tails)) = T/2 - \Theta(\sqrt(T)) Our second lower bound shows the dependence on sqrt(T) is needed. Consider n=2.

Summary Can use to combine multiple algorithms to do nearly as well as best in hindsight. Can apply RWM in situations where experts are making choices that cannot be combined. E.g., repeated game-playing. E.g., online shortest path problem Extensions: “bandit” problem. efficient algs for some cases with many experts. Sleeping experts / “specialists” setting.

41 Homework Translation this ppt