-
Book Overview & Buying
-
Table Of Contents
Machine Learning for Emotion Analysis in Python
By :
Using either LEX with optimal local thresholds or Naïve Bayes or SVM with an optimal global threshold with neutral as a label seems to be the best way so far of dealing with multilabel datasets. Our final strategy for these datasets is to train a set of classifiers via the one-versus-the-rest strategy, using one of our existing classifiers for training each member of the set. For this, we will adapt the MULTICLASSIFIER class from Chapter 7, Support Vector Machines, to allow different kinds of classifiers to be used at the lower level. The key change here from the original is that we specify what classifier to use in the set of optional arguments, rather than assuming that we will be using SVMCLASSIFIER:
def __init__(self, train, showprogress=True, args={}): self.train = train
T = time.time()
...