*3.1.3.1. No-retweets*

The graph above depicts the results obtained from analysis of tweets that were not retweeted, as in these tweets were posted by the original author. **Figure 7** shows that two hundred and forty five (245) tweets were negative and three hundred and five (305) were positive.

*3.1.3.2. Retweets*

twenty eight (328) were positive.

*3.1.4. Barack Obama's visit to Jamaica*

**Figure 9**, generated by RStudio.

**Figure 8.** Sentiment polarity of tweets obtained on Barack Obama's visit to Jamaica.

Of the retweets, three hundred and eleven (311) tweets were negative and three hundred and

Using Sentiment Analysis and Machine Learning Algorithms to Determine Citizens' Perceptions

http://dx.doi.org/10.5772/intechopen.72521

73

**Figure 8** shows that the majority (2583) tweets of the three thousand five hundred and one (3500) tweets collected on Barack Obama's visit to Jamaica were positive. This demonstrates that the Jamaican citizens on Twitter social supported the visit of the President to Jamaica. However, six hundred and fifty eight (658) Jamaicans on Twitter expressed negative sentiments toward Barack Obama's visit to Jamaica. There was a movement suggesting the success of visit of his visit was dependent on whether he offered or announced a Presidential Pardon to the country's first national hero Marcus Garvey, civil rights activist in Jamaica and the USA, who allegedly was falsely convicted of mail fraud in the USA. Failure to grant a pardon to the civil rights activists spurred some of the negative tweets. Hence, *anger* appears on the word cloud in

**Figure 6.** Sentiment polarity of tweets obtained on the Riverton Landfill fire in Jamaica.

**Figure 7.** Sentiment polarity of no-retweets obtained on the Riverton Landfill fire in Jamaica.
