Skip to main content

An implementation of latent Dirichlet allocation

Project description


This is an implementation of Latent Dirichlet Allocation for pedagogical purposes.


  • numpy
  • tqdm


from ktlda import KtLDA
import pickle

with open('ourdata-cleaned.pickle', 'rb') as f:
    comp, rec = pickle.load(f)
X = comp + rec
Y = [0] * len(comp) + [1] * len(rec)

lda = KtLDA(n_components=2, alpha=0.5, beta=0.5, iterations=10, max_vocab=5000, random_state=663)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ktLDA, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size ktLDA-0.0.6-cp37-cp37m-macosx_10_14_x86_64.whl (156.8 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size ktLDA-0.0.6.tar.gz (108.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page