SlideShare a Scribd company logo
1 of 43
Download to read offline
Intelligent Search
Intelligent Search
   (or at least really clever)
Some Preliminaries
• Text retrieval = matrix multiplication
     A: our corpus
     documents are rows
     terms are columns
Some Preliminaries
• Text retrieval = matrix multiplication
     A: our corpus
     documents are rows
     terms are columns

     for each document d:
      for each term t:
        sd += adt qt
Some Preliminaries
• Text retrieval = matrix multiplication
     A: our corpus
     documents are rows
     terms are columns

     sd = Σt adt qt
Some Preliminaries
• Text retrieval = matrix multiplication
     A: our corpus
     documents are rows
     terms are columns

     s=Aq
More Preliminaries
• Recommendation = Matrix multiply
    A: our users’ histories
    users are rows
    items are columns
More Preliminaries
• Recommendation = Matrix multiply
    A: our users’ histories
    users are rows
    items are columns

   Users who bought items
   in the list h also bought
   items in the list r
More Preliminaries
• Recommendation = Matrix multiply
    A: our users’ histories
    users are rows
    items are columns

   for each user u:
    for each item t1:
      for each item t2:
         rt1 += au,t1 au,t2 ht2
More Preliminaries
• Recommendation = Matrix multiply
    A: our users’ histories
    users are rows
    items are columns

   sd = Σt2 Σu au,t1 au,t2 qt2
More Preliminaries
• Recommendation = Matrix multiply
    A: our users’ histories
    users are rows
    items are columns

   s = A’ (A q)
More Preliminaries
• Recommendation = Matrix multiply
    A: our users’ histories
    users are rows
    items are columns

   s = (A’ A) q
More Preliminaries
• Recommendation = Matrix multiply
    A: our users’ histories
    users are rows
    items are columns

   s = (A’ A) q   ish!
Why so ish?

• In real life, ish happens because:
 • Big data ... so we selectively sample
 • Sparse data ... so we smooth
 • Finite computers ... so we sparsify
 • Top-40 effect ... so we use some stats
The same in spite of ish

• The shape of the computation is unchanged
• The cost of the computation is unchanged
• Broad algebraic conclusions still hold
Back to recommendations ...
Dyadic Structure
●   Functional
    – Interaction:   actor -> item*
●   Relational
    – Interaction    ⊆ Actors x Items
●   Matrix
    – Rows    indexed by actor, columns by item
    – Value   is count of interactions
●   Predict missing observations
Fundamental Algorithmics
●   Cooccurrence

●   A is actors x items, K is items x items
●   Product has general shape of matrix
●   K tells us “users who interacted with x also
    interacted with y”
Fundamental Algorithmic Structure
●   Cooccurrence

●   Matrix approximation by factoring




●   LLR
But Wait ...
But Wait ...
Does it have to be that way?
What we have:

For a user who watched/bought/listened to this
What we have:

  For a user who watched/bought/listened to this



Sum over all other users who watched/bought/...
What we have:

  For a user who watched/bought/listened to this



Sum over all other users who watched/bought/...



  Add up what they watched/bought/listened to
What we have:

  For a user who watched/bought/listened to this



Sum over all other users who watched/bought/...



  Add up what they watched/bought/listened to


                      And recommend that
What we have:

  For a user who watched/bought/listened to this



Sum over all other users who watched/bought/...



  Add up what they watched/bought/listened to


                      And recommend that


                               ish
What we have:

Add up what they watched/bought/listened to
What we have:

Add up what they watched/bought/listened to



               But wait, we can do that faster
What we have:

Add up what they watched/bought/listened to



               But wait, we can do that faster
But why not ...
But why not ...
But why not ...




Why just dyadic learning?
But why not ...




Why just dyadic learning?

Why not triadic learning?
But why not ...




Why just dyadic learning?

Why not p-adic learning?
For example
●   Users enter queries (A)
    – (actor   = user, item=query)
●   Users view videos (B)
    – (actor   = user, item=video)
●   AʼA gives query recommendation
    – “did   you mean to ask for”
●   BʼB gives video recommendation
    – “you   might like these videos”
The punch-line
●   BʼA recommends videos in response to a query
    – (isnʼt   that a search engine?)
    – (not   quite, it doesnʼt look at content or meta-data)
Real-life example
●   Query: “Paco de Lucia”
●   Conventional meta-data search results:
    – “hombres   del paco” times 400
    – not   much else
●   Recommendation based search:
    – Flamenco    guitar and dancers
    – Spanish   and classical guitar
    – Van   Halen doing a classical/flamenco riff
Real-life example
Real-life example
System Diagram
     Viewing Logs      selective
                                   count
       t user video    sampler


Search Logs            selective                       llr +    Related videos
                                     count
  t user query-term    sampler                       sparsify    v => v1 v2...


                                                                Related terms
                                   join on                       v => t1 t2...
                                             count
                                     user


                      Hadoop
Indexing
        Related terms
         v => t1 t2...


    Related videos
     v => v1 v2...
                         join on
                                    Lucene Index
                          video
 Video meta
   v => url title...



Hadoop                             Lucene (+Katta?)
Hypothetical Example
●   Want a navigational ontology?
●   Just put labels on a web page with traffic
    – This   gives A = users x label clicks
●   Remember viewing history
    – This   gives B = users x items
●   Cross recommend
    – BʼA =   click to item mapping
●   After several users click, results are whatever
    users think they should be
Resources
●   My blog
    – http://tdunning.blogspot.com/

●   The original LLR in NLP paper
    –   Accurate Methods for the Statistics of Surprise and Coincidence
        (check on citeseer)
●   Source code
    – Mahout      project
    – contact     me (tdunning@apache.org)

More Related Content

Similar to Intelligent Search

Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...
Simplilearn
 
Getting the most out of your Ruby on Rails applications: from zero to hero
Getting the most out of your Ruby on Rails applications: from zero to heroGetting the most out of your Ruby on Rails applications: from zero to hero
Getting the most out of your Ruby on Rails applications: from zero to hero
Filip Tepper
 
Recommendations play @flipkart
Recommendations play @flipkartRecommendations play @flipkart
Recommendations play @flipkart
hava101
 
Tag And Tag Based Recommender
Tag And Tag Based RecommenderTag And Tag Based Recommender
Tag And Tag Based Recommender
gu wendong
 

Similar to Intelligent Search (20)

Recommendation Subsystem - Museum Radar
Recommendation Subsystem - Museum RadarRecommendation Subsystem - Museum Radar
Recommendation Subsystem - Museum Radar
 
Buidling large scale recommendation engine
Buidling large scale recommendation engineBuidling large scale recommendation engine
Buidling large scale recommendation engine
 
Recommender lecture
Recommender lectureRecommender lecture
Recommender lecture
 
Collaborative Filtering at Spotify
Collaborative Filtering at SpotifyCollaborative Filtering at Spotify
Collaborative Filtering at Spotify
 
Aspect Detection for Sentiment / Emotion Analysis
Aspect Detection for Sentiment / Emotion AnalysisAspect Detection for Sentiment / Emotion Analysis
Aspect Detection for Sentiment / Emotion Analysis
 
CSE545 sp23 (2) Streaming Algorithms 2-4.pdf
CSE545 sp23 (2) Streaming Algorithms 2-4.pdfCSE545 sp23 (2) Streaming Algorithms 2-4.pdf
CSE545 sp23 (2) Streaming Algorithms 2-4.pdf
 
Let's Get to the Rapids
Let's Get to the RapidsLet's Get to the Rapids
Let's Get to the Rapids
 
Machine learning @ Spotify - Madison Big Data Meetup
Machine learning @ Spotify - Madison Big Data MeetupMachine learning @ Spotify - Madison Big Data Meetup
Machine learning @ Spotify - Madison Big Data Meetup
 
Recsys 2018 overview and highlights
Recsys 2018 overview and highlightsRecsys 2018 overview and highlights
Recsys 2018 overview and highlights
 
Balancing Infrastructure with Optimization and Problem Formulation
Balancing Infrastructure with Optimization and Problem FormulationBalancing Infrastructure with Optimization and Problem Formulation
Balancing Infrastructure with Optimization and Problem Formulation
 
Models for Information Retrieval and Recommendation
Models for Information Retrieval and RecommendationModels for Information Retrieval and Recommendation
Models for Information Retrieval and Recommendation
 
Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...Data Science With Python | Python For Data Science | Python Data Science Cour...
Data Science With Python | Python For Data Science | Python Data Science Cour...
 
Recommender Systems from A to Z – The Right Dataset
Recommender Systems from A to Z – The Right DatasetRecommender Systems from A to Z – The Right Dataset
Recommender Systems from A to Z – The Right Dataset
 
Playlist Recommendations @ Spotify
Playlist Recommendations @ SpotifyPlaylist Recommendations @ Spotify
Playlist Recommendations @ Spotify
 
Graph processing at scale using spark & graph frames
Graph processing at scale using spark & graph framesGraph processing at scale using spark & graph frames
Graph processing at scale using spark & graph frames
 
Recommender Systems
Recommender SystemsRecommender Systems
Recommender Systems
 
Getting the most out of your Ruby on Rails applications: from zero to hero
Getting the most out of your Ruby on Rails applications: from zero to heroGetting the most out of your Ruby on Rails applications: from zero to hero
Getting the most out of your Ruby on Rails applications: from zero to hero
 
Recommender systems session b
Recommender systems session bRecommender systems session b
Recommender systems session b
 
Recommendations play @flipkart
Recommendations play @flipkartRecommendations play @flipkart
Recommendations play @flipkart
 
Tag And Tag Based Recommender
Tag And Tag Based RecommenderTag And Tag Based Recommender
Tag And Tag Based Recommender
 

More from Ted Dunning

Progress for big data in Kubernetes
Progress for big data in KubernetesProgress for big data in Kubernetes
Progress for big data in Kubernetes
Ted Dunning
 
Dunning time-series-2015
Dunning time-series-2015Dunning time-series-2015
Dunning time-series-2015
Ted Dunning
 

More from Ted Dunning (20)

Dunning - SIGMOD - Data Economy.pptx
Dunning - SIGMOD - Data Economy.pptxDunning - SIGMOD - Data Economy.pptx
Dunning - SIGMOD - Data Economy.pptx
 
How to Get Going with Kubernetes
How to Get Going with KubernetesHow to Get Going with Kubernetes
How to Get Going with Kubernetes
 
Progress for big data in Kubernetes
Progress for big data in KubernetesProgress for big data in Kubernetes
Progress for big data in Kubernetes
 
Anomaly Detection: How to find what you didn’t know to look for
Anomaly Detection: How to find what you didn’t know to look forAnomaly Detection: How to find what you didn’t know to look for
Anomaly Detection: How to find what you didn’t know to look for
 
Streaming Architecture including Rendezvous for Machine Learning
Streaming Architecture including Rendezvous for Machine LearningStreaming Architecture including Rendezvous for Machine Learning
Streaming Architecture including Rendezvous for Machine Learning
 
Machine Learning Logistics
Machine Learning LogisticsMachine Learning Logistics
Machine Learning Logistics
 
Tensor Abuse - how to reuse machine learning frameworks
Tensor Abuse - how to reuse machine learning frameworksTensor Abuse - how to reuse machine learning frameworks
Tensor Abuse - how to reuse machine learning frameworks
 
Machine Learning logistics
Machine Learning logisticsMachine Learning logistics
Machine Learning logistics
 
T digest-update
T digest-updateT digest-update
T digest-update
 
Finding Changes in Real Data
Finding Changes in Real DataFinding Changes in Real Data
Finding Changes in Real Data
 
Where is Data Going? - RMDC Keynote
Where is Data Going? - RMDC KeynoteWhere is Data Going? - RMDC Keynote
Where is Data Going? - RMDC Keynote
 
Real time-hadoop
Real time-hadoopReal time-hadoop
Real time-hadoop
 
Cheap learning-dunning-9-18-2015
Cheap learning-dunning-9-18-2015Cheap learning-dunning-9-18-2015
Cheap learning-dunning-9-18-2015
 
Sharing Sensitive Data Securely
Sharing Sensitive Data SecurelySharing Sensitive Data Securely
Sharing Sensitive Data Securely
 
Real-time Puppies and Ponies - Evolving Indicator Recommendations in Real-time
Real-time Puppies and Ponies - Evolving Indicator Recommendations in Real-timeReal-time Puppies and Ponies - Evolving Indicator Recommendations in Real-time
Real-time Puppies and Ponies - Evolving Indicator Recommendations in Real-time
 
How the Internet of Things is Turning the Internet Upside Down
How the Internet of Things is Turning the Internet Upside DownHow the Internet of Things is Turning the Internet Upside Down
How the Internet of Things is Turning the Internet Upside Down
 
Apache Kylin - OLAP Cubes for SQL on Hadoop
Apache Kylin - OLAP Cubes for SQL on HadoopApache Kylin - OLAP Cubes for SQL on Hadoop
Apache Kylin - OLAP Cubes for SQL on Hadoop
 
Dunning time-series-2015
Dunning time-series-2015Dunning time-series-2015
Dunning time-series-2015
 
Doing-the-impossible
Doing-the-impossibleDoing-the-impossible
Doing-the-impossible
 
Anomaly Detection - New York Machine Learning
Anomaly Detection - New York Machine LearningAnomaly Detection - New York Machine Learning
Anomaly Detection - New York Machine Learning
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Intelligent Search

  • 2. Intelligent Search (or at least really clever)
  • 3. Some Preliminaries • Text retrieval = matrix multiplication A: our corpus documents are rows terms are columns
  • 4. Some Preliminaries • Text retrieval = matrix multiplication A: our corpus documents are rows terms are columns for each document d: for each term t: sd += adt qt
  • 5. Some Preliminaries • Text retrieval = matrix multiplication A: our corpus documents are rows terms are columns sd = Σt adt qt
  • 6. Some Preliminaries • Text retrieval = matrix multiplication A: our corpus documents are rows terms are columns s=Aq
  • 7. More Preliminaries • Recommendation = Matrix multiply A: our users’ histories users are rows items are columns
  • 8. More Preliminaries • Recommendation = Matrix multiply A: our users’ histories users are rows items are columns Users who bought items in the list h also bought items in the list r
  • 9. More Preliminaries • Recommendation = Matrix multiply A: our users’ histories users are rows items are columns for each user u: for each item t1: for each item t2: rt1 += au,t1 au,t2 ht2
  • 10. More Preliminaries • Recommendation = Matrix multiply A: our users’ histories users are rows items are columns sd = Σt2 Σu au,t1 au,t2 qt2
  • 11. More Preliminaries • Recommendation = Matrix multiply A: our users’ histories users are rows items are columns s = A’ (A q)
  • 12. More Preliminaries • Recommendation = Matrix multiply A: our users’ histories users are rows items are columns s = (A’ A) q
  • 13. More Preliminaries • Recommendation = Matrix multiply A: our users’ histories users are rows items are columns s = (A’ A) q ish!
  • 14. Why so ish? • In real life, ish happens because: • Big data ... so we selectively sample • Sparse data ... so we smooth • Finite computers ... so we sparsify • Top-40 effect ... so we use some stats
  • 15. The same in spite of ish • The shape of the computation is unchanged • The cost of the computation is unchanged • Broad algebraic conclusions still hold
  • 17. Dyadic Structure ● Functional – Interaction: actor -> item* ● Relational – Interaction ⊆ Actors x Items ● Matrix – Rows indexed by actor, columns by item – Value is count of interactions ● Predict missing observations
  • 18. Fundamental Algorithmics ● Cooccurrence ● A is actors x items, K is items x items ● Product has general shape of matrix ● K tells us “users who interacted with x also interacted with y”
  • 19. Fundamental Algorithmic Structure ● Cooccurrence ● Matrix approximation by factoring ● LLR
  • 21. But Wait ... Does it have to be that way?
  • 22. What we have: For a user who watched/bought/listened to this
  • 23. What we have: For a user who watched/bought/listened to this Sum over all other users who watched/bought/...
  • 24. What we have: For a user who watched/bought/listened to this Sum over all other users who watched/bought/... Add up what they watched/bought/listened to
  • 25. What we have: For a user who watched/bought/listened to this Sum over all other users who watched/bought/... Add up what they watched/bought/listened to And recommend that
  • 26. What we have: For a user who watched/bought/listened to this Sum over all other users who watched/bought/... Add up what they watched/bought/listened to And recommend that ish
  • 27. What we have: Add up what they watched/bought/listened to
  • 28. What we have: Add up what they watched/bought/listened to But wait, we can do that faster
  • 29. What we have: Add up what they watched/bought/listened to But wait, we can do that faster
  • 30. But why not ...
  • 31. But why not ...
  • 32. But why not ... Why just dyadic learning?
  • 33. But why not ... Why just dyadic learning? Why not triadic learning?
  • 34. But why not ... Why just dyadic learning? Why not p-adic learning?
  • 35. For example ● Users enter queries (A) – (actor = user, item=query) ● Users view videos (B) – (actor = user, item=video) ● AʼA gives query recommendation – “did you mean to ask for” ● BʼB gives video recommendation – “you might like these videos”
  • 36. The punch-line ● BʼA recommends videos in response to a query – (isnʼt that a search engine?) – (not quite, it doesnʼt look at content or meta-data)
  • 37. Real-life example ● Query: “Paco de Lucia” ● Conventional meta-data search results: – “hombres del paco” times 400 – not much else ● Recommendation based search: – Flamenco guitar and dancers – Spanish and classical guitar – Van Halen doing a classical/flamenco riff
  • 40. System Diagram Viewing Logs selective count t user video sampler Search Logs selective llr + Related videos count t user query-term sampler sparsify v => v1 v2... Related terms join on v => t1 t2... count user Hadoop
  • 41. Indexing Related terms v => t1 t2... Related videos v => v1 v2... join on Lucene Index video Video meta v => url title... Hadoop Lucene (+Katta?)
  • 42. Hypothetical Example ● Want a navigational ontology? ● Just put labels on a web page with traffic – This gives A = users x label clicks ● Remember viewing history – This gives B = users x items ● Cross recommend – BʼA = click to item mapping ● After several users click, results are whatever users think they should be
  • 43. Resources ● My blog – http://tdunning.blogspot.com/ ● The original LLR in NLP paper – Accurate Methods for the Statistics of Surprise and Coincidence (check on citeseer) ● Source code – Mahout project – contact me (tdunning@apache.org)