1 unstable release

0.1.0 Nov 17, 2020

#25 in #bayesian

MIT license

2KB

LDA: Latent Dirichlet Allocation

Version 0.1.0 of this library is in development.

Proposed API.

use lda::{Library, StopWords, Lda, LdaArgs, LdaAlgorithm};

let library = Library::from_path("my-docs.txt")
    .stop_words(StopWords::English)
    .min_word_occurance(10)
    .build();

let lda_args = LdaArgs {
    alpha: 0.5,
    beta: 0.5,
    n_topics: 4
};

let mut lda = Lda::new(&library, lda_args);

let mut rng = rand::thread_rng();

lda.fit(1_000, LdaAlgorithm::Gibbs, &mut rng);

No runtime deps