Skip to content

actionml/template-scala-topic-model-LDA

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Topic Modeling Template - LDA

This template requires spark >= 1.4.0.

Input data is plain text, in data/data.txt , one line per LDA "document".

create a PIO app: pio app new YOURAPPNAME

import the data using: python data/import_eventserver.py --access_key YOURACCESSKEYHERE

Params are in engine.json, the most important to consider is number of topics.

build,train the LDA model:

    pio train 
    pio deploy```


prediction query:
``` {"text":  "wishing he did not have to go"} ```

The response contains the top topic for this document, as well as the full set of topics for comparison (with the top 10 terms shown for each topic, for reference). You may wish to alter this to return only top topic.

For the time being, you can only query on documents from the training set.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 90.3%
  • Python 9.7%