Giter VIP home page Giter VIP logo

gpudmm's Introduction

GPUDMM

The implementations of the GPUDMM topic models, as described in 2016 SIGIR paper:

Topic Modeling for Short Texts with Auxiliary Word Embeddings. Chenliang Li, Haoran Wang, Zhiqian Zhang, Aixin Sun, Zongyang Ma.

Description

This repository doesn't contain the preprocess steps. So if you want to use this code, you should prepare the data by yourself.

Also this repository doesn't contain the metric code for classification and PMI score.

The classification algorithm we used is SVM provided by scikit.

The PMI Coherence should calculated in external corpus, such as Wikipedia for English or Baidu Baike for Chinese.

The data format is described as follows:

docID \t category | content

example:

0 business|manufacture manufacturers suppliers supplier china directory products taiwan manufacturer


Anonther file you should prepare is the word similarity file. In our paper, we use the cosine similarity calculated on word embeddings. This can be prepared in advance.

Parameter Explanation

beta: the hyper-parameter beta, and the alpha is calculated as 50/numTopic.

similarityFileName: the file of words' similarity

weight: the promotion of similar word

threshold: the similar threshold for constructing similar word set

filterSize: the filter size for filtering similar word set

numIter: the number of iteration for gibbs sampling progress

Model Result Explanation

*_pdz.txt: the topic-level representation for each document. Each line is a topic distribution for one document. This is used for classification task.

*_phi.txt: the word-level representation for each topic. Each line is a word distribution for one topic. This is used for PMI Coherence task.

*_words.txt: word, wordID map information. This is used for PMI Coherence task.

gpudmm's People

Contributors

duanyu avatar nobodywhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gpudmm's Issues

关于qa_data.txt问题

首先感谢你们做出的贡献
我在制作qa_data.txt时遇到了问题:你们引用的web snippet数据集我在其他人的论文中找到了,但是它的格式是这样的:

manufacture manufacturer directory directory china taiwan products manufacturers directory- taiwan china products manufacturer direcory exporter directory supplier directory suppliers business
empmag electronics manufacturing procurement homepage electronics manufacturing procurement magazine procrement power products production essentials data management business
......

请问你们在形成自己的qa_data.txt时候,比如business这一条,是找到所有在business前面出现过的词,然后放到 0 business| 的后面的吗?
@NobodyWHU @duanyu

missing GSDMM

Hi,
I was trying to test GPUDMM on my dataset.
It seems missing the source file for the GSDMM.
Could you please update or share the file?

thanks and best regards,

raz

'cannot find symbol' compilation error

Hi,

Thanks for sharing your work.
I have a compilation error when I'm trying to compile RatioGPUDMM.java

$ javac RatioGPUDMM.java
RatioGPUDMM.java:17: error: cannot find symbol
import RatioGPUDMM.Document;
^
symbol: class Document
location: package RatioGPUDMM
RatioGPUDMM.java:26: error: cannot find symbol
public ArrayList docList;
^
symbol: class Document
location: class RatioGPUDMM
RatioGPUDMM.java:60: error: cannot find symbol
public RatioGPUDMM(ArrayList doc_list, int num_topic, int num_iter, int save_step, double beta,
^
symbol: class Document
location: class RatioGPUDMM
RatioGPUDMM.java:445: error: cannot find symbol
Document doc = docList.get(i);
^
symbol: class Document
location: class RatioGPUDMM
RatioGPUDMM.java:473: error: variable topic is already defined in method init_GSDMM()
int topic = rg.nextInt(numTopic);
^
RatioGPUDMM.java:721: error: cannot find symbol
ArrayList doc_list = new Document.LoadCorpus("corpus.txt");
^
symbol: class Document
location: class RatioGPUDMM
RatioGPUDMM.java:721: error: package Document does not exist
ArrayList doc_list = new Document.LoadCorpus("corpus.txt");
^
7 errors

My version of java:

$ java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

I'm not really an expert of Java (Python) and I haven't found the bug.
Could you help me please?

Thx mat

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.