Git Product home page Git Product logo

enrontopicmodelling's Introduction

This uses gensim's online latent dirichlet allocation implementation to topic model the Enron Email dataset. The Enron Emails contain 517,431 emails from 150 Enron executive accounts covering a period from December 1979 through February 2004, with the majority of emails occurring during 1999, 2000, and 2001. After training, we can infer 100 latent topics in the corpus. Topics are interpreted by their probability distribution over words.

Example topic word distributions:

 * topic #34: 0.010*nymex + 0.008*exchange + 0.007*futures + 0.007*member + 0.005*clearing + 0.005*notice
 * topic #15: 0.011*game + 0.006*fantasy + 0.005*football + 0.005*wr + 0.005*play + 0.005*rb
 * topic #39: 0.007*emissions + 0.007*environmental + 0.005*etrade + 0.005*epa + 0.005*lcampbensf + 0.004*permit
 * topic #76: 0.006*chairman + 0.005*president + 0.004*ceo + 0.004*global + 0.004*businesses + 0.004*chief 
 * topic #17: 0.022*sally + 0.013*beck + 0.012*becks + 0.010*sbecknsf + 0.007*sallybeckdec
 * topic #96: 0.004*agreement + 0.003*credit + 0.003*language + 0.003*such + 0.003*section + 0.003*under
 * topic #58: 0.006*california + 0.005*market + 0.005*said + 0.004*iso + 0.004*electricity + 0.004*ferc

With a trained model we can also infer, for each email, a probability distribution over topics. With each email represented as a vector of topic probabilities, we can do things like cluster similar emails together via the cosine similarity measure, or assign topics to new unseen documents (like user queries) and retrieve all emails that match that topic.
Each email gets stored in mongo alongside its dominant topic, it's full distribution, as well as some metadata (e.g. from, to, date, etc.). This allows us to build higher level analysis like the graphs of topic frequency over time.

The Enron emails can be obtained here: http://www.cs.cmu.edu/~enron/

Dependencies:

* gensim - online (memory-independent) topic modeling. Read more here: http://radimrehurek.com/gensim/
* pymongo
* matplotlib for plotting analysis of email topic distributions

enrontopicmodelling's People

Contributors

coreylynch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.