three flavors of predictions in online algorithms
play

THREE FLAVORS OF PREDICTIONS IN ONLINE ALGORITHMS Manish Purohit - PowerPoint PPT Presentation

THROUGH THE LENS OF SKI RENTAL THREE FLAVORS OF PREDICTIONS IN ONLINE ALGORITHMS Manish Purohit Joint work with Ravi Kumar, Zoya Svitkina, and Erik Vee OUTLINE Motivation Ski Rental Problem The Fortune Cookie The Weatherman


  1. THROUGH THE LENS OF SKI RENTAL THREE FLAVORS OF PREDICTIONS IN ONLINE ALGORITHMS Manish Purohit Joint work with Ravi Kumar, Zoya Svitkina, and Erik Vee

  2. OUTLINE • Motivation • Ski Rental Problem • The Fortune Cookie • The Weatherman • The Constrained Adversary • Conclusions

  3. TACKLING UNCERTAINTY Online Algorithms Machine Learning - Observe past data - Full input is unknown - Build robust models to - Design algorithms for predict the future worst-possible future - Highly successful! - Pessimistic - Trained for good average - Cannot exploit patterns / performance predictability in data. - Not robust to outliers

  4. SKI RENTAL PROBLEM Sam recently moved to Colorado • Renting : $1 • Buying : $B • Should he rent or should he buy? • Missing: How often does Sam want to • ski?

  5. SKI RENTAL PROBLEM Sam is very pessimistic and strongly • believes “Anything that can go wrong will go wrong” %&' $ Minimizes max $ • ()*($)

  6. SKI RENTAL PROBLEM %&' $ Minimizes max $ • ()*($) Deterministic Algorithm: • – Buy on day B-1 – 2-competitive Randomized Algorithm: • 867 5 – Sample - ∈ 1, 1 ; 3 - ∝ 567 – Buy on day - 9 967 -competitive –

  7. THE FORTUNE COOKIE You will ski 26 times Notation • ! ← predicted number of days – # = % − ! = prediction error – Competitive Ratio • Function of the error – '() * – +,- * ≤ / # 0 Consistency Algorithm is 1 -consistent if / 0 = 1 • Robustness • Algorithm is 3 -robust if / # ≤ 3 for all #

  8. ATTEMPT 1 Blind Trust • If ! ≥ # – Buy on day 1 • Else – Rent every day

  9. ATTEMPT 1 Blind Trust Analysis • If ! ≥ # If (! ≥ # and % ≥ #) or (! < # and % < #) -./ = 123 – Buy on day 1 • Else If ! ≥ # and % < # -./ = # ≤ % + ! − % = 123 + 7 – Rent every day If ! < # and % ≥ # -./ = % ≤ # + % − ! = 123 + 7 0 b x y

  10. ATTEMPT 1 Blind Trust Analysis • If ! ≥ # If (! ≥ # and % ≥ #) or (! < # and % < #) -./ = 123 – Buy on day 1 • Else If ! ≥ # and % < # -./ = # ≤ % + ! − % = 123 + 7 – Rent every day If ! < # and % ≥ # -./ = % ≤ # + % − ! = 123 + 7 OPT ALG 0 x b y

  11. ATTEMPT 1 Blind Trust Analysis • If ! ≥ # If (! ≥ # and % ≥ #) or (! < # and % < #) -./ = 123 – Buy on day 1 • Else If ! ≥ # and % < # -./ = # ≤ % + ! − % = 123 + 7 – Rent every day If ! < # and % ≥ # -./ = % ≤ # + % − ! = 123 + 7 OPT ALG 0 y b x

  12. ATTEMPT 1 Blind Trust Analysis • If ! ≥ # If (! ≥ # and % ≥ #) or (! < # and % < #) -./ = 123 – Buy on day 1 • Else If ! ≥ # and % < # -./ = # ≤ % + ! − % = 123 + 7 – Rent every day If ! < # and % ≥ # -./ = % ≤ # + % − ! = 123 + 7 -./ ≤ 123 + 7

  13. ATTEMPT 1 Blind Trust ! • If ! ≥ # 1-consistent! – Buy on day 1 • Else – Rent every day " Not Robust $%& ≤ ()* + ,

  14. ATTEMPT 2 Cautious Trust Analysis Let ! ∈ 0,1 be a • -./ 9:, 012 , 9;, 8 012 ≤ min 1 + ! + hyperparameter , If & ≥ ( • – Buy on day ⌈!(⌉ 9;, (1 + !) -consistent! -Robust Else • , + ! ! – Buy on day ,

  15. ATTEMPT 2 Cautious Trust )*+ (1 + !) -consistent! -Robust + ! ∈ 0,1 gives a tradeoff • between consistency and robustness Small ! • – Higher trust in the predictions – Better consistency – Worse robustness

  16. ATTEMPT 2 Cautious Trust )*+ (1 + !) -consistent! -Robust + ! ∈ 0,1 gives a tradeoff • between consistency and robustness Small ! • – Higher trust in the predictions – Better consistency Can we do better? – Worse robustness

  17. ATTEMPT 3 Let’s randomize! • If ! ≥ # • – $ = ⌊'#⌋ /-* ,-. . Define ) * ← – ⋅ ,(. - . -./, 3 ) , Choose 5 ∈ 1, 2, … , $ randomly from – distribution defined by ) * . Buy on day j – Else • , – ℓ = < ℓ-* ,-. . Define = – * ← ⋅ ,(. - . -./, ℓ ) , Choose 5 ∈ 1, 2, … , ℓ randomly from – distribution defined by = * . Buy on day j –

  18. ATTEMPT 3 Let’s randomize! • . < -Robust . -> ?@ -consistent! .-> ? @?A If ! ≥ # • B – $ = ⌊'#⌋ /-* ,-. . Define ) * ← – ⋅ ,(. - . -./, 3 ) , Choose 5 ∈ 1, 2, … , $ randomly from – distribution defined by ) * . Buy on day j – Else • , – ℓ = < ℓ-* ,-. . Define = – * ← ⋅ ,(. - . -./, ℓ ) , Choose 5 ∈ 1, 2, … , ℓ randomly from – distribution defined by = * . Buy on day j –

  19. THE FORTUNE COOKIE You will ski 26 times Prediction Error !"# + 3 , $%& ≤ min 1 + $%& , ,-. / 0/5 , -. /0 6 Consistency Robustness

  20. OUTLINE • Motivation • Ski Rental Problem • The Fortune Cookie • The Weatherman • The Constrained Adversary • Conclusions

  21. THE WEATHERMAN • Predictions are backed by a probabilistic guarantee • The algorithm can utilize these error probabilities to obtain better performance

  22. THE WEATHERMAN FOR SKI RENTAL Suppose we train a binary classifier to predict whether Sam will ski • for more than b days or not ℎ ← probability of correct prediction • The algorithm knows ℎ • (say, by observing performance on validation data) What algorithms can we obtain in this setting? •

  23. THE WEATHERMAN FOR SKI RENTAL If prediction < b days • Buy on day b – If prediction more than b days • Buy on day ! with probability " # – Minimize $ subject to ∀&, ( )*+ & ≤ $ min(1, &)

  24. THE WEATHERMAN FOR SKI RENTAL If prediction < b days • Buy on day b – If prediction more than b days • Competitive ratio Buy on day ! with probability " # – Minimize $ subject to ∀&, ( )*+ & ≤ $ min(1, &) h

  25. THE WEATHERMAN Competitive ratio competitive ratio = "(ℎ) ( * " 1 = 1, " ) = *+( h

  26. OUTLINE • Motivation • Ski Rental Problem • The Fortune Cookie • The Weatherman • The Constrained Adversary • Conclusions

  27. THE CONSTRAINED ADVERSARY • Bound the amount of uncertainty • Make structural assumptions about the online input • More structure → Better guarantees

  28. THE CONSTRAINED ADVERSARY More convenient to work with • fractional version of the problem Costs 1 to buy skis • Costs ! to rent for ! time (fractional) • Constraint: " ≥ $ • “Sam knows he’ll ski at least five • times”

  29. THE CONSTRAINED ADVERSARY Let ! " # ← Probability of buying on day z • Let 4 5 ← Probability of buying on the 8irst day • Say we enforce ! " # = 0, ∀# > 1 (Even the deterministic algorithm • does that) What’s the expected algorithm cost for @ days? • H 1 + # ! " # I# + ∫ J @! " # I# ABCD " @ = 4 5 + ∫ • G H KLMN O H Set probabilities so that PQR(H,J) is a constant •

  30. THE CONSTRAINED ADVERSARY Let ! " # ← Probability of buying on day z • Let 4 5 ← Probability of buying on the 8irst day • Say we enforce ! " # = 0, ∀# > 1 (Even the deterministic algorithm • does that) What’s the expected algorithm cost for @ days? • U H 1 + # ! " # I# + ∫ J @! " # I# There exists a randomized algorithm with competitive ratio ABCD " @ = 4 5 + ∫ • U V JV" U O G H KLMN O H Set probabilities so that PQR(H,J) is a constant •

  31. CONCLUSIONS The Fortune Cookie • – Predictions with no error guarantees – Competitive ratio = min(consistency, robustness) The Weatherman • – Predicts with error guarantees – Competitive ratio = function(error probability) The Constrained Adversary (Semi-Online) • – Structural assumptions about input – Improved competitive ratios

  32. THANKS!

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend