Skip to content
Basic tensorflow implementation of logistic latent Dirichlet allocation
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Logistic LDA

This package provides basic implementations of logistic latent Dirichlet allocation. It can be used to discover topics in data containing groups of thematically related items, using either labeled data or unlabeled data.

If you want to reproduce experiments of our paper, start here instead instead: :octocat: logistic-lda/experiments


  • tensorflow == 1.13.2
  • numpy >= 1.16.4

The code was tested with the versions above, but older versions might also work.

Getting started

To get started, download a version of the 20-Newsgroups dataset in TFRecord format:


Once downloaded, training can be started with:


To use your own dataset, take a look at ./logistic_lda/ for a description of the data format expected by the training script. Alternatively, modify the training script to use datasets not stored as TFRecords.

After training has finished, compute predictions on another dataset and evaluate accuracy:


The results of the evaluation can be found in ./models/news20/.


I. Korshunova, H. Xiong, M. Fedoryszak, L. Theis
Discriminative Topic Modeling with Logistic LDA
Advances in Neural Information Processing Systems 33, 2019

You can’t perform that action at this time.