Download presentation
Presentation is loading. Please wait.
Published byCameron Townsend Modified over 9 years ago
1
Streaming Predictions of User Behavior in Real- Time Ethan DereszynskiEthan Dereszynski (Webtrends) Eric ButlerEric Butler (Cedexis) OSCON 2014
2
How come you never see a headline like "Psychic Wins Lottery"? Jay Leno
6
Enabling Interesting Predictions: Leverage Streaming Data
7
Streams Data websockets
8
Streams Data websockets 1 second
9
Streams
10
The best way to predict the future is to invent it. Alan Kay
11
Session Data Each user “click” triggers a event Event information captured by embedded tag
12
Session Data A session is a string of events that all correspond to a single “visit” to a web site. Event 1Event 2
13
Session Data A session end when a visitor leaves the site, closes the browser, or goes idle for 30 minutes Event 1Event 2Event 3
14
Learning from Streaming Data Sessions provide examples of visit behavior Not all sessions are equally likely -Many paths are rarely, if ever, taken -Frequent paths suggest common ways visitors behave on a given site Learning Models of Visitor Behavior -Predict future actions -Provides a rich, new feature to identify/segment users -Identify users who have a common trajectory, or subtrajectory, through the web site -More than just a label -Behavior tells us something about how users achieve a goal on a web site
15
Event Data JSON containing parameter/value pairs Describes content of page (triggered by event) Contains geo, device, referrer, etc. 50-100 parameters per page (event)
16
Challenges of Real Data How do we describe each event? -Number of parameters per event can be large -Space of possible “events” is massive Not all parameters are relevant to the user’s actions Client 1 Client 2 Number of events
17
About Topics Models Each topic is a distribution over all words in the dictionary Each document is generated by a mixture of topics D. Blei. Probabilistic topic models. Communications of the ACM, 55(4):77–84, 2012.
18
Abstraction Layer: Global/Local Topic – Latent Dirichlet Allocation (GLT-LDA) Topic modeling technique for document clustering -Documents assigned to a single topic (instead of a mixture) -Global “Noise” topic explains redundant parameters Clusters parameters into topics Distribution over parameter for topic k Distribution over noise parameters j th parameter in event i Noise-indicator for j th parameter in event i Topic distribution Noise rate for document i Topic label for document i
19
The Dataset Collection of visitor traces, varying length … Event 1Event 2 Event t Visitor 1 Visitor 2 … Visitor n
20
Representing Behavior: Two Approaches Enumerate the space of all possible paths and count -This is would require a very big table. -Most of the entries would be 0. -Not clear how to handle variable length visits Hidden Markov Model (HMM) -Encodes visitor behavior in a probabilistic model -Calculates likelihood (or probability) of specific trajectories -Enables prediction of future actions a visitor may take on the site
21
The Hidden Markov Model Site visit (emission) probabilities: Stochastic state transitions: … ObservedHidden
22
The Hidden Markov Model Viewing Products Product Comparison Make Purchase.6.4 Visitors arrive at a site with an intention -The current intention specifies the probability they will take some action (trigger an event) -After the page is selected, the intention transitions to a new value (could be the same as the previous intention).7.3
23
The Hidden Markov Model Viewing Products.7.3.7.3 Product Comparison Visitors arrive at a site with an intention -The current intention specifies the probability they will take some action (trigger an event) -After the page is selected, the intention transitions to a new value (could be the same as the previous intention).15.85 Make Purchase
24
Predictive Model: Learning and Runtime Offline: -Session data is recorded into batch file for training -Trained with expectation maximization (EM) algorithm Online : -The model used to predict specific visitor actions -CartAdd (add an item to the shopping cart) -Purchase (complete the purchase funnel) -Conditions predictions on observed actions the visitor has taken so far -Update predictions each time a new action is taken by the visitor. -Can be generalized to other predictive queries
25
Online Inference Goal: Compute the probability that actions t+1 to t+5 contain at least a single purchase / cartAdd. t t+1t+2t+3t+4t+5 act. state
26
Online Inference Goal: Compute the probability that actions t+1 to t+5 contain at least a single purchase / cartAdd. t t+1t+2t+3t+4t+5 act. state Prediction window
27
SequenceTimeAction t = 0 ? t = 1 ? t = 2 ? t = 3 ? t = 4 ?
28
SequenceTimeAction t = 019:38:47.182Z Landing: Clicked Ad t = 119:38:52.571Z ListView t = 219:39:01.941Z ProductView t = 3 ? t = 4 ? t = 5 ? t = 6 ? t = 7 ?
29
SequenceTimeAction t = 019:38:47.182Z Landing: Clicked Ad t = 119:38:52.571Z ListView t = 219:39:01.941Z ProductView t = 319:39:15.467Z Link t = 419:43:08.296Z Link t = 519:50:23.952Z ProductView t = 6 ? t = 7 ? t = 8 ? t = 9 ? t = 10 ?
30
SequenceTimeAction t = 019:38:47.182Z Landing: Clicked Ad t = 119:38:52.571Z ListView t = 219:39:01.941Z ProductView t = 319:39:15.467Z Link t = 419:43:08.296Z Link t = 519:50:23.952Z ProductView t = 619:50:47.646Z AddedToCart t = 7 ? t = 8 ? t = 9 ? t = 10 ? t = 11 ?
31
SequenceTimeAction t = 019:38:47.182Z Landing: Clicked Ad t = 119:38:52.571Z ListView t = 219:39:01.941Z ProductView t = 319:39:15.467Z Link t = 419:43:08.296Z Link t = 519:50:23.952Z ProductView t = 619:50:47.646Z AddedToCart t = 719:51:01.273Z ProductView t = 819:51:11.691Z Link t = 919:51:20.499Z Link t = 10 ? t = 11 ? t = 12 ? t = 13 ? t = 14 ?
32
SequenceTimeAction t = 019:38:47.182Z Landing: Clicked Ad t = 119:38:52.571Z ListView t = 219:39:01.941Z ProductView t = 319:39:15.467Z Link t = 419:43:08.296Z Link t = 519:50:23.952Z ProductView t = 619:50:47.646Z AddedToCart t = 719:51:01.273Z ProductView t = 819:51:11.691Z Link t = 919:51:20.499Z Link t = 1019:51:27.320Z ListView t = 1119:51:47.992Z ProductView t = 1219:52:04.216Z ListView t = 1319:52:11.398Z ProductView t = 1419:52:20.873Z Link t = 15 ? t = 16 ? t = 17 ? t = 18 ? t = 19 ?
33
SequenceTimeAction t = 019:38:47.182Z Landing: Clicked Ad t = 119:38:52.571Z ListView t = 219:39:01.941Z ProductView t = 319:39:15.467Z Link t = 419:43:08.296Z Link t = 519:50:23.952Z ProductView t = 619:50:47.646Z AddedToCart t = 719:51:01.273Z ProductView t = 819:51:11.691Z Link t = 919:51:20.499Z Link t = 1019:51:27.320Z ListView t = 1119:51:47.992Z ProductView t = 1219:52:04.216Z ListView t = 1319:52:11.398Z ProductView t = 1419:52:20.873Z Link t = 1519:54:18.080Z ViewedCart t = 1619:55:32.557Z StartCheckout t = 1719:57:13.246Z CompletedPurchase t = 1819:57:39.698Z ConfirmCheckout t = 19-24?
34
Streams Data websockets
35
Prediction Bolt Prediction Architecture: Validation Bolt Validates raw events from Kafka Augments events with prediction values and confidence labels
36
Prediction Bolt Event Stream Bolt Session Stream Bolt Prediction Architecture: Validation Bolt Validates raw events from Kafka Augments events with prediction values and confidence labels Dispatches individual events to Streams Dispatches full sessions to Streams websockets
37
Prediction BoltROC Bolt Event Stream Bolt Session Stream Bolt Prediction Architecture: Validation Bolt Validates raw events from Kafka Augments events with prediction values and confidence labels Dispatches individual events to Streams Dispatches full sessions to Streams Completed sessions are used to scored predictive model’s accuracy Model receives new thresholds for confidence labels websockets
38
Streams Demo
39
Results
40
Next Steps Integrating visitor information across multiple visits Automated re-training of predictive model -Adjust to seasonal and trend effects Generative models for Anomaly Detection -What does a Likely/Unlikely session look like? Richer models of visitor behavior -Hierarchical models for behavior
41
Questions? Thank you! Ethan.Dereszynski@webtrends.com elbpdx@gmail.com
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.