Giter Site home page Giter Site logo

hiernmf2-vis's Introduction

Hierarchical rank-2 NMF with visualization

Hierarchical rank-2 nonnegative matrix factorization (HierNMF2) is an unsupervised algorithm for large-scale document clustering and topic modeling. It is about 20 times faster than LDA with comparable quality. HierNMF2 has also been successfully applied in the area of bioinformatics.

This package provides code for the algorithm used in this paper:

Da Kuang, P. Jeffrey Brantingham, Andrea L. Bertozzi,
Crime Topic Modeling,
Crime Science, 6(12), 2017.

and is based on the following paper:

Da Kuang, Haesun Park,
Fast rank-2 nonnegative matrix factorization for hierarchical document clustering,
The 19th ACM SIGKDD International Conference on Knowledge, Discovery, and Data Mining (KDD '13), pp. 739-747, 2013.

Please cite the above papers if you find the code useful.

Prerequisites

The code was developed and tested on Ubuntu Linux 14.04 LTS.

  • Matlab R2011a or above
  • Python 2.7.x
  • Latex with TikZ and tikz-qtree packages

Testing

The entry point of the code is workflow.py. It starts from a text file to the generation of the tree structure visualization. To test the code:

  1. Create a text file test.txt, where each line contains a document.
  2. Run python workflow.py test.txt 20 to generate 20 leaf clusters/topics. Adjust the number of clusters/topics according to your needs.

Example

Below is a visualization of 20 leaf topics generated on ~30,000 image captions from the Yelp Challenge dataset, which finished in a few seconds on a commodity PC laptop.

Reference: https://github.com/dakuang/hiernmf2

hiernmf2-vis's People

Contributors

skywalker5 avatar dakuang avatar

Watchers

James Cloos avatar  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.