我正在使用堆栈溢出标记预测变量。
我有一个数据框df,其中包含功能'post'和标签'Tags',它们可以是多个标签。
我的df是:
Tags post
0 [php] check upload file image without mime type woul...
1 [firefox] prevent firefox close press ctrl-w favorite ed...
2 [r] r error invalid type list variable import matl...
3 [c#] replace special character url probably simple ...
4 [php, api] modify whois contact detail function modify mc...
... ... ...
179995 [delphi] intraweb isapi module throw unrecognized comma...
179996 [c] opencv argc argv confusion check opencv tutori...
179997 [android] list data sdcard want display file name reside...
179998 [java, email] add sort extension imap server mail server sup...
179999 [linux, php] create carddav ldap server share host via php ...
所以我想使用word2vec进行分类并预测标签。
我想使用所有机器学习分类器,例如SVM,随机森林等
我也想要标签的分类报告。
所以请帮助我。
word2vec不是单词到矢量转换器的分类器,我的建议步骤1)预处理文本(如停用词和规范化)2)使用TF-IDF或word2vec将单词转换为向量3)然后应用ml模型(对于多分类,您可以使用SVM,朴素贝叶斯和逻辑回归)4)验证结果