ktLDA
This is an implementation of Latent Dirichlet Allocation for pedagogical purposes.
Dependencies
- numpy
- tqdm
Examples
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)
lda.fit(X)
print(lda.doc_topic_dist)
Metadata
Release files for ktLDA 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ktLDA-0.0.6.tar.gz | 108.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ktLDA-0.0.6-cp37-cp37m-macosx_10_14_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | macOS 10.14+ x86-64 | Details |
Total release size: 265.5 kB
Release files / ktLDA-0.0.6.tar.gz
| Download URL | ktLDA-0.0.6.tar.gz |
|---|---|
| Size | 108.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6aa8ad7e0b53f9801a7819401524d9871fcffed433ff7174202b4767939d2845
|
|
BLAKE2b-256 checksum How to use checksums |
6e57d2b92f39223d8aaa0ea8adbaa477d6278ce1ab003c2fc406b4205f297a19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / ktLDA-0.0.6-cp37-cp37m-macosx_10_14_x86_64.whl
| Download URL | ktLDA-0.0.6-cp37-cp37m-macosx_10_14_x86_64.whl |
|---|---|
| Size | 156.8 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
88fe720695d10dc32370c8fcb724872fcb5806ad51badde08d0cf455ae43a564
|
|
BLAKE2b-256 checksum How to use checksums |
f6c1eb3b5fbeb447bf6614fe4e84acf01a83feba33cc61a7487fb633b22fc121
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|