Naive Bayes classifier for sentiment analysis of tweets

조회 수: 4 (최근 30일)
Frank Olsen
Frank Olsen 2020년 4월 8일
답변: Hritika Suneja 2020년 12월 31일
I'm currently working on a project where I'm using tweets to predict deriative prices. My tweet data is a time series containing datetime, tweet text, etc.
Originally I wanted to start with the Naive Bayes classifier method using the Statisitics and Machine Learning Toolbox to predict the sentiment of a new tweet. However I found that the example does not fit the data, which contains strings with the tweets and not numerical variables.
I did manage to perform the SVM and Convolutional Neural Network, since the examples where more applicable to my data.
Does anyone know how to apply the Naive Bayes Classifier to a sentiment analysis?
Thanks
Frank

답변 (1개)

Hritika Suneja
Hritika Suneja 2020년 12월 31일
You cannot use Naive Bayes classifier directly on your text data as the input to NaiveBayes classifier needs to be a numeric matrix.You will have to preprocess your text data using text analytic techniques such as tokenization and word encodings which will convert your text data to numeric sequnce which can be used for further classification. Please refer to the following documentation link which gives more details about different techniques for preprocessing the data : https://www.mathworks.com/products/text-analytics.html. Hope it helps !

카테고리

Help CenterFile Exchange에서 Classification에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by