ywwbill / SupervisedLDA

Supervised LDA variations with tree priors and hinge loss
3 stars 0 forks source link

Supervised LDA

A package of supervised LDA which can incorporate labels, tree priors, and hinge loss. Most code can be applied to general data, as long as they meet the format requirements. The code for computing Pearson correlation coefficient is specifically implemented for the EmoInt data.

Dependencies

Use Supervised LDA Tools in Command Line

The general command line format is

java -cp slda.jar:lib/* cmd.{Tools} -arg1 <arg1-value> -arg2 <arg2-value> ... -argn <argn-value>

Supervised LDA

java -cp slda.jar:lib/* cmd.CmdSLDA -v <vocab-file> -d <corpus-file> -l <label-file> -m <model-file>

Supervised LDA with Tree Priors

java -cp slda.jar:lib/* cmd.CmdTSLDA -v <vocab-file> -tp <tree-prior-file> -d <corpus-file> -l <label-file> -m <model-file>

Building Tree Priors

java -cp slda.jar:lib/* cmd.CmdTree -v <vocab-file> -e <embedding-file> -o <tree-prior-file>

Evaluating the Correlation

java -cp slda.jar:lib/* cmd.CmdEval -p <prediction-file> -l <gold-label-file>

Resources

References

Supervised LDA

Jon D. McAuliffe and David M. Blei. 2008. Supervised topic models. In Proceedings of Advances in Neural Information Processing Systems.

Tree Priors

Weiwei Yang, Jordan Boyd-Graber, and Philip Resnik. 2017. Adapting Topic Models using Lexical Associations with Tree Priors. In Proceedings of Empirical Methods in Natural Language Processing.