-
Book Overview & Buying
-
Table Of Contents
Machine Learning for Emotion Analysis in Python
By :
In Chapter 6, Naive Bayes, we looked at using Bayes’ Theorem to find the emotions that are associated with individual tweets. The conclusion there was that the standard Naive Bayes algorithm worked well with some datasets and less well with others. In the following chapters, we will look at several other algorithms to see whether we can get any improvements, starting in this chapter with the well-known support vector machine (SVM) (Boser et al., 1992) approach.
We will start this chapter by giving a brief introduction to SVMs. This introduction will take a geometric approach that may be easier for you than the standard presentation. Bennett and Bredensteiner (see the References section) give detailed formal proof that the two approaches are equivalent – the discussion in this chapter is intended simply to provide an intuitive grasp of the issues. We will then show you how to use the sklearn.svm.LinearSVC implementation for our current task....