我正在尝试使用支持向量机(SVM)进行文档分类。我拥有的文档是电子邮件的集合。我有大约3000个文档来训练SVM分类器,并且有大约700个需要分类的测试文档集。
我最初使用二进制DocumentTermMatrix作为支持向量机训练的输入。用测试数据进行分类,我得到了大约81%的准确率。DocumentTermMatrix是在删除几个停用词之后使用的。
因为我想提高这个模型的准确性,所以我尝试使用基于LSA/SVD的降维,并将得到的降维因子作为分类模型的输入(我尝试了原始包中约3000个单词的20、50、100和200个奇异值)。在每种情况下,分类的性能都会恶化。(使用LSA/SVD的另一个原因是为了克服其中一个响应变量有65个级别的内存问题)。
有人能提供一些关于如何提高LSA/SVD分类性能的建议吗?我意识到这是一个没有任何具体数据或代码的一般性问题,但希望专家能就从哪里开始调试提供一些意见。
仅供参考,我使用R进行文本预处理(包: tm、snowball、lsa)和构建分类模型(包: kernelsvm)
谢谢。
发布于 2011-11-23 16:16:41
这里有一些一般性的建议-没有专门针对LSA的,但它可能有助于改善结果。
发布于 2014-09-27 15:20:13
这可能不是最好的量身定制的答案。希望这些建议能有所帮助。
也许你可以使用词汇化而不是词干来减少不可接受的结果。短而密集:http://nlp.stanford.edu/IR-book/html/htmledition/stemming-and-lemmatization-1.html
The goal of both stemming and lemmatization is to reduce inflectional forms and
sometimes derivationally related forms of a word to a common base form.
However, the two words differ in their flavor. Stemming usually refers to a crude
heuristic process that chops off the ends of words in the hope of achieving this
goal correctly most of the time, and often includes the removal of derivational
affixes. Lemmatization usually refers to doing things properly with the use of a
vocabulary and morphological analysis of words, normally aiming to remove
inflectional endings only and to return the base or dictionary form of a word,
which is known as the lemma.一个实例:
go,goes,going ->Lemma: go,go,go ||Stemming: go, goe, go并使用一些预定义的规则集;使得短期单词被概括。例如:
I'am -> I am
should't -> should not
can't -> can not如何处理句子中的括号。
This is a dog(Its name is doggy)括号内的文本通常指的是提到的实体的别名。您可以删除它们,或者执行correference analysis并将其视为一个新句子。
发布于 2015-05-06 11:51:55
尝试使用Local LSA,与全局LSA相比,它可以改进分类过程。此外,LSA的能力完全取决于其参数,因此请尝试调整参数(从1开始,然后是2或更多)并比较结果以提高性能。
https://stackoverflow.com/questions/7819940
复制相似问题