Steps in Sentimental analysis
1) Read the data
2) Build text Corpus
3) Data Transformation / Cleaning
4) Tag the sentiments
5) Checking the overall Sentiment Score
>table (analysis$score)
6) Analysis$sentiment<- ifelse(analysis$score>0,”positive”, ifelse
(analysis$score <0 , “negative”, “neutral”))
table(analysis$sentiment)
7. Clean the data again
8. Split the data into training & test data sets
9. Tagging the testing & training datasets
>train_data$type=“train”
>test_data$type=“test”
Rupak Roy
Steps in Sentimental analysis
10. Combine Tweets<-rbind(train_data, test_data)
11. Building TDM matrix=create_matrix(………………..)
12. Convert to matrix data type mat=as.matrix(matrix)
13. Build the data to specify response variable, training set, testing set,
container=create_contrainer(……………….)
14. Train the model/create model using algorithm svm,RF,TREE…etc
15. Test the model > results =classify_model(container, models)
16. Model Performance – Confusion Matrix , Recall Accuracy.
17. Model summary- summary(analytics)
18. Ensemble of models – analystics@ensemble_summary
19. Cross Validation
Rupak Roy

Sentiment Analysis Practical Steps

  • 1.
    Steps in Sentimentalanalysis 1) Read the data 2) Build text Corpus 3) Data Transformation / Cleaning 4) Tag the sentiments 5) Checking the overall Sentiment Score >table (analysis$score) 6) Analysis$sentiment<- ifelse(analysis$score>0,”positive”, ifelse (analysis$score <0 , “negative”, “neutral”)) table(analysis$sentiment) 7. Clean the data again 8. Split the data into training & test data sets 9. Tagging the testing & training datasets >train_data$type=“train” >test_data$type=“test” Rupak Roy
  • 2.
    Steps in Sentimentalanalysis 10. Combine Tweets<-rbind(train_data, test_data) 11. Building TDM matrix=create_matrix(………………..) 12. Convert to matrix data type mat=as.matrix(matrix) 13. Build the data to specify response variable, training set, testing set, container=create_contrainer(……………….) 14. Train the model/create model using algorithm svm,RF,TREE…etc 15. Test the model > results =classify_model(container, models) 16. Model Performance – Confusion Matrix , Recall Accuracy. 17. Model summary- summary(analytics) 18. Ensemble of models – analystics@ensemble_summary 19. Cross Validation Rupak Roy