sanjivjha / btm Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/btm
Automatically exported from code.google.com/p/btm
BRIFE ILLUSTRATION OF THE IMPLEMENTATIONS OF BTM AND BBTM MODEL More detail is refered to the paper[1]. Author: Xiaohui Yan([email protected]) Date: 2012-09-25 Version: 0.1 1. Biterm Topic Model(BTM) In BTM, the distribution of a biterm b=(w1,w2) is P(w1,w2) = \sum_k{P(w1|k)*P(w2|k)*P(k)}. It can be viewed as a special case of mixture of unigrams with only two words. Steps of Gibbs algorithm for BTM: 1) Randomly assign topic uniformly to each biterm b 2) for each biterm b i) reset topic assignment of b ii) sample topic k according to P(k|B-b) iii) re-assign topic k to biterm b 3) looper step 2) until converge 4) inference the parameters {P(k), P(w|k)} 2. Run 1) make 2) estimation k=20 # topic number alpha=`echo "scale=3;50/$k"|bc` beta=0.01 niter=1000 # maximum iteration savestep=100 # save parameters every 100 iteration doc_pt= # training file dir= # output dir ./btm est $k ${alpha} ${beta} $niter $savestep $doc_pt $dir 3) inference ./src/btm inf $k $doc_infer_pt 3. Input & Output Both $doc_pt and $doc_infer_pt have the following format: doc_id wi_id wj_id count for example:0 0 1 1 means words 0 and 1 co-occurrs once in document 0 References [1] Xiaohui Yan, Jiafeng Guo, Yanyan Lan, Xueqi Cheng. A Biterm Topic Model For Short Text. Submitted to WWW2013. TODO: add a test case History:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.