神刀安全网

Lda2vec: Tools for interpreting natural language

lda2vec: Tools for interpreting natural language

Lda2vec: Tools for interpreting natural language Lda2vec: Tools for interpreting natural language Lda2vec: Tools for interpreting natural language Lda2vec: Tools for interpreting natural language Lda2vec: Tools for interpreting natural language

The lda2vec model tries to mix the best parts of word2vec and LDA into a single framework. word2vec captures powerful relationships between words, but the resulting vectors are largely interpretable and don’t represent documents. LDA on the other hand is quite interpretable by humans, but doesn’t model local word relationships like word2vec. We build a model that builds both word and document topics, makes them interpreable, makes topics over clients, times, and documents, and makes them supervised topics.

Resources

See this Jupyter Notebook for an example of an end-to-end demonstration.

See this presentation for a presentation focused on the benefits of word2vec, LDA, and lda2vec.

See the API reference docs

About

Lda2vec: Tools for interpreting natural language

Word2vec tries to model word-to-word relationships.

Lda2vec: Tools for interpreting natural language

LDA models document-to-word relationships.

Lda2vec: Tools for interpreting natural language

LDA yields topics over each document.

Lda2vec: Tools for interpreting natural language

lda2vec yields topics not over just documents, but also regions.

Lda2vec: Tools for interpreting natural language

lda2vec also yields topics over clients.

Lda2vec: Tools for interpreting natural language

lda2vec the topics can be ‘supervised’ and forced to predict another target.

lda2vec also includes more contexts and features than LDA. LDA dictates that words are generated by a document vector; but we might have all kinds of ‘side-information’ that should influence our topics. For example, a single client comment is about a particular item ID, written at a particular time and in a particular region. In this case, lda2vec gives you topics over all items (separating jeans from shirts, for example) times (winter versus summer) regions (desert versus coastal) and clients (sporty vs professional attire).

Ultimately, the topics are interpreted using the excellent pyLDAvis library:

Lda2vec: Tools for interpreting natural language

Requirements

Minimum requirements:

  • Python 2.7+
  • NumPy 1.10+
  • Chainer 1.5.1+
  • spaCy 0.99+

Requirements for some features:

  • CUDA support
  • Testing utilities: py.test

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Lda2vec: Tools for interpreting natural language

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮