horizont: Topic models in Python
horizont implements a number of topic models. Conventions from scikit-learn are followed.
The following models are implemented using Gibbs sampling.
Latent Dirichlet allocation (Blei et al., 2003; Pritchard et al., 2000)
(Coming soon) Logistic normal topic model
(Coming soon) Dynamic topic model (Blei and Lafferty, 2006)
Getting started
horizont.LDA implements latent Dirichlet allocation (LDA) using Gibbs sampling. The interface follows conventions in scikit-learn.
>>> import numpy as np
>>> from horizont import LDA
>>> X = np.array([[1,1], [2, 1], [3, 1], [4, 1], [5, 8], [6, 1]])
>>> model = LDA(n_topics=2, random_state=0, n_iter=100)
>>> doc_topic = model.fit_transform(X) # estimate of document-topic distributions
>>> model.components_ # estimate of topic-word distributions
Requirements
Python 2.7 or Python 3.3+ is required. The following packages are also required:
futures (Python 2.7 only)
GSL is required for random number generation inside the Pólya-Gamma random variate generator. On Debian-based sytems, GSL may be installed with the command sudo apt-get install libgsl0-dev. horizont looks for GSL headers and libraries in /usr/include and /usr/lib/ respectively.
Cython is needed if compiling from source.
Important links
Documentation: http://pythonhosted.org/horizont
Source code: https://github.com/ariddell/horizont/
Issue tracker: https://github.com/ariddell/horizont/issues
License
horizont is licensed under Version 3.0 of the GNU General Public License. See LICENSE file for a text of the license or visit http://www.gnu.org/copyleft/gpl.html.
Metadata
Release files for horizont 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| horizont-0.0.5.tar.gz | 1.3 MB | Without provenance | Details |
Release files / horizont-0.0.5.tar.gz
| Download URL | horizont-0.0.5.tar.gz |
|---|---|
| Size | 1.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1af2470d7524a4b15f2a1d74a07df63e5f52327a2a22f894be3c3a84af61ec7d
|
|
BLAKE2b-256 checksum How to use checksums |
3c9eb2959b398b7d2b6c089ccc9a1f6f262d4df76eb79ca1576c9b7139043698
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for horizont 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.