Giter VIP home page Giter VIP logo

sgrld's Introduction

Stochastic Gradient Riemannian Langevin Dynamics for Latent Dirichlet Allocation

Sam Patterson and Yee Whye Teh [email protected] and [email protected]

(C) Copyright 2013, Sam Patterson and Yee Whye Teh

This is free software, you can redistribute it and/or modify it under the terms of the GNU General Public License.

The GNU General Public License does not permit this software to be redistributed in proprietary programs.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


This Python code implements the stochastic gradient Riemannian Langevin dynamics (SGRLD) algorithm presented in the paper "Stochastic Gradient Riemannian Langevin Dynamics on the Probability Simplex" by Sam Patterson and Yee Whye Teh at NIPS 2013. BibTeX entry:

@inproceedings{PatTeh2013a, 
  Author = {S. Patterson and Y. W. Teh},
  Booktitle = {Advances in Neural Information Processing Systems},
  Title = {Stochastic Gradient {R}iemannian {L}angevin Dynamics on the Probability Simplex},
  Year = {2013}}

We use cython for the Gibbs sampling step which means you need to compile:

$ python setup.py build_ext --inplace

The entry point is run_wiki.py which runs the algorithm on articles from wikipedia. Currently it's set to download articles as it is running which is slow. It is recommended either downloading a batch and storing for subsequent runs of the experiment, as detailed in the code, or using the xml dumps of wikipedia here:

http://dumps.wikimedia.org/enwiki/latest/

We don't have code to process those files into the required form, but there is some at

http://www.ragtag.info/2011/feb/10/processing-every-wikipedia-article/

which could be adapted to do that.

sgrld's People

Contributors

ywteh 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.