1©MapR Technologies - Confidential
Online Learning
Bayesian bandits and more
2©MapR Technologies - Confidential
whoami – Ted Dunning
 Ted Dunning
tdunning@maprtech.com
tdunning@apache.org
@ted_dunni...
3©MapR Technologies - Confidential
Online
Scalable
Incremental
4©MapR Technologies - Confidential
Scalability and Learning
 What does scalable mean?
 What are inherent characteristics...
5©MapR Technologies - Confidential
Scalable ≈ On-line
If you squint just right
6©MapR Technologies - Confidential
unit of work ≈ unit of time
7©MapR Technologies - Confidential
Learning
State
Infinite
Data
Stream
8©MapR Technologies - Confidential
Pick One
9©MapR Technologies - Confidential
10©MapR Technologies - Confidential
11©MapR Technologies - Confidential
Now pick again
12©MapR Technologies - Confidential
A Quick Diversion
 You see a coin
– What is the probability of heads?
– Could it be l...
13©MapR Technologies - Confidential
Which One to Play?
 One may be better than the other
 The better coin pays off at so...
14©MapR Technologies - Confidential
A First Conclusion
 Probability as expressed by humans is subjective and depends on
i...
15©MapR Technologies - Confidential
A Second Conclusion
 A single number is a bad way to express uncertain knowledge
 A ...
16©MapR Technologies - Confidential
I Dunno
17©MapR Technologies - Confidential
5 and 5
18©MapR Technologies - Confidential
2 and 10
19©MapR Technologies - Confidential
The Cynic Among Us
20©MapR Technologies - Confidential
Demo
21©MapR Technologies - Confidential
An Example
22©MapR Technologies - Confidential
An Example
23©MapR Technologies - Confidential
The Cluster Proximity Features
 Every point can be described by the nearest cluster
–...
24©MapR Technologies - Confidential
Diagonalized Cluster Proximity
25©MapR Technologies - Confidential
Lots of Clusters Are Fine
26©MapR Technologies - Confidential
Surrogate Method
 Start with sloppy clustering into κ = k log n clusters
 Use these ...
27©MapR Technologies - Confidential
Algorithm Costs
 O(k d log n) per point for Lloyd’s algorithm
… not so good for k = 2...
28©MapR Technologies - Confidential
3,000 times faster sounds good
29©MapR Technologies - Confidential
3,000 times faster sounds good
but that isn’t the big news
30©MapR Technologies - Confidential
3,000 times faster sounds good
but that isn’t the big news
these algorithms do
on-line...
31©MapR Technologies - Confidential
Parallel Speedup?
1 2 3 4 5 20
10
100
20
30
40
50
200
Threads
Timeperpoint(μs)
2
3
4
5...
32©MapR Technologies - Confidential
What about deployment?
33©MapR Technologies - Confidential
Learning
State
Infinite
Data
Stream
34©MapR Technologies - Confidential
Mapper
State
Data
Split
35©MapR Technologies - Confidential
Mapper
State
Data
Split
Need shared
memory!
MapperMapper
36©MapR Technologies - Confidential
whoami – Ted Dunning
 We’re hiring at MapR
 Ted Dunning
tdunning@maprtech.com
tdunni...
Upcoming SlideShare
Loading in …5
×

Strata New York 2012

201 views

Published on

This set of slides describes several on-line learning algorithms which taken together can provide significant benefit to real-time applications. Given by Ted Dunning at Strata New York.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
201
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Strata New York 2012

  1. 1. 1©MapR Technologies - Confidential Online Learning Bayesian bandits and more
  2. 2. 2©MapR Technologies - Confidential whoami – Ted Dunning  Ted Dunning tdunning@maprtech.com tdunning@apache.org @ted_dunning  We’re hiring at MapR  For slides and other info http://www.slideshare.net/tdunning
  3. 3. 3©MapR Technologies - Confidential Online Scalable Incremental
  4. 4. 4©MapR Technologies - Confidential Scalability and Learning  What does scalable mean?  What are inherent characteristics of scalable learning?  What are the logical implications?
  5. 5. 5©MapR Technologies - Confidential Scalable ≈ On-line If you squint just right
  6. 6. 6©MapR Technologies - Confidential unit of work ≈ unit of time
  7. 7. 7©MapR Technologies - Confidential Learning State Infinite Data Stream
  8. 8. 8©MapR Technologies - Confidential Pick One
  9. 9. 9©MapR Technologies - Confidential
  10. 10. 10©MapR Technologies - Confidential
  11. 11. 11©MapR Technologies - Confidential Now pick again
  12. 12. 12©MapR Technologies - Confidential A Quick Diversion  You see a coin – What is the probability of heads? – Could it be larger or smaller than that?  I flip the coin and while it is in the air ask again  I catch the coin and ask again  I look at the coin (and you don’t) and ask again  Why does the answer change? – And did it ever have a single value?
  13. 13. 13©MapR Technologies - Confidential Which One to Play?  One may be better than the other  The better coin pays off at some rate  Playing the other will pay off at a lesser rate – Playing the lesser coin has “opportunity cost”  But how do we know which is which? – Explore versus Exploit!
  14. 14. 14©MapR Technologies - Confidential A First Conclusion  Probability as expressed by humans is subjective and depends on information and experience
  15. 15. 15©MapR Technologies - Confidential A Second Conclusion  A single number is a bad way to express uncertain knowledge  A distribution of values might be better
  16. 16. 16©MapR Technologies - Confidential I Dunno
  17. 17. 17©MapR Technologies - Confidential 5 and 5
  18. 18. 18©MapR Technologies - Confidential 2 and 10
  19. 19. 19©MapR Technologies - Confidential The Cynic Among Us
  20. 20. 20©MapR Technologies - Confidential Demo
  21. 21. 21©MapR Technologies - Confidential An Example
  22. 22. 22©MapR Technologies - Confidential An Example
  23. 23. 23©MapR Technologies - Confidential The Cluster Proximity Features  Every point can be described by the nearest cluster – 4.3 bits per point in this case – Significant error that can be decreased (to a point) by increasing number of clusters  Or by the proximity to the 2 nearest clusters (2 x 4.3 bits + 1 sign bit + 2 proximities) – Error is negligible – Unwinds the data into a simple representation
  24. 24. 24©MapR Technologies - Confidential Diagonalized Cluster Proximity
  25. 25. 25©MapR Technologies - Confidential Lots of Clusters Are Fine
  26. 26. 26©MapR Technologies - Confidential Surrogate Method  Start with sloppy clustering into κ = k log n clusters  Use these clusters as a weighted surrogate for the data  Cluster surrogate data using ball k-means  Results are provably high quality for highly clusterable data  Sloppy clustering can be done on-line  Surrogate can be kept in memory  Ball k-means pass can be done at any time
  27. 27. 27©MapR Technologies - Confidential Algorithm Costs  O(k d log n) per point for Lloyd’s algorithm … not so good for k = 2000, n = 108  Surrogate methods …. O(d log κ) = O(d (log k + log log n)) per point  This is a big deal: – k d log n = 2000 x 10 x 26 = 500,000 – d (log k + log log n) = 10 (11 + 5) = 170 – 3,000 times faster makes the grade as a bona fide big deal
  28. 28. 28©MapR Technologies - Confidential 3,000 times faster sounds good
  29. 29. 29©MapR Technologies - Confidential 3,000 times faster sounds good but that isn’t the big news
  30. 30. 30©MapR Technologies - Confidential 3,000 times faster sounds good but that isn’t the big news these algorithms do on-line clustering
  31. 31. 31©MapR Technologies - Confidential Parallel Speedup? 1 2 3 4 5 20 10 100 20 30 40 50 200 Threads Timeperpoint(μs) 2 3 4 5 6 8 10 12 14 16 Threaded version Non- threaded Perfect Scaling ✓
  32. 32. 32©MapR Technologies - Confidential What about deployment?
  33. 33. 33©MapR Technologies - Confidential Learning State Infinite Data Stream
  34. 34. 34©MapR Technologies - Confidential Mapper State Data Split
  35. 35. 35©MapR Technologies - Confidential Mapper State Data Split Need shared memory! MapperMapper
  36. 36. 36©MapR Technologies - Confidential whoami – Ted Dunning  We’re hiring at MapR  Ted Dunning tdunning@maprtech.com tdunning@apache.org @ted_dunning  For slides and other info http://www.slideshare.net/tdunning

×