package owl

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Owl_nlp_ldaSource

NLP: LDA module

Type definition
Sourcetype lda_typ =
  1. | SimpleLDA
  2. | FTreeLDA
  3. | LightLDA
  4. | SparseLDA
    (*

    Type of LDA training algorithms.

    *)
Sourcetype model

Type of LDA model.

Core functions
Sourceval init : ?iter:int -> int -> Owl_nlp_corpus.t -> model

``init ~iter k v d`` inits an LDA model for training. The default iteration is 100.

Parameters: * ``iter``: number of iterations. * ``k``: number of topics. * ``d``: corpus.

Sourceval train : lda_typ -> model -> unit

After calling ``init``, calling this function starts the training.

Helper functions
Sourceval show_info : model -> int -> float -> unit

Function for printing out log information, tailored for LDA training.

Sourceval include_token : model -> int -> int -> int -> unit

Include a token in model, used in training and you are not supposed to use it.

Sourceval exclude_token : model -> int -> int -> int -> unit

Exclude a token in model, used in training and you are not supposed to use it.

OCaml

Innovation. Community. Security.