小编Seu*_*nah的帖子

结合 LSA/LSI 与朴素贝叶斯进行文档分类

我是gensim包和向量空间模型的新手,我不确定我应该如何处理我的 LSA 输出。

为了简要概述我的目标,我想使用主题建模来增强朴素贝叶斯分类器,以改进评论(正面或负面)的分类。这是我一直在阅读的一篇很棒的论文,它塑造了我的想法,但让我对实现仍然有些困惑。

我已经得到了朴素贝叶斯的工作代码——目前,我只是使用一元词袋,因为我的特征和标签要么是正面的,要么是负面的。

这是我的 gensim 代码

from pprint import pprint # pretty printer
import gensim as gs

# tutorial sample documents
docs = ["Human machine interface for lab abc computer applications",
              "A survey of user opinion of computer system response time",
              "The EPS user interface management system",
              "System and human system engineering testing of EPS",
              "Relation of user perceived response time to error measurement",
              "The generation of random binary unordered trees", …
Run Code Online (Sandbox Code Playgroud)

latent-semantic-indexing document-classification gensim latent-semantic-analysis naivebayes

5
推荐指数
1
解决办法
1128
查看次数