如何使用单词作为特征来使用随机森林算法对文本进行情感分析?我使用单词作为特征,而随机森林使用数字,这就是我卡住的地方。
问问题
1325 次
2 回答
2
I think you can use sckit-learn to facilitate you in solving it. You can look for tutorial at the website of sckit-learn tutorial here. it will be very useful.
When working with text features you can use CountVectorizer or DictVectorizer. Take a look at feature extraction and especially section 4.1.3 here.
To facilitate you to know more, you can find an example here. It will useful for classifying text documents.
于 2018-05-13T13:08:28.457 回答
0
您可以在随机森林管道的预处理部分使用 countvectorizer 或 tfidf。发布您的数据的摘录,我将演示
于 2021-03-06T14:22:23.403 回答