July 2018
Beginner to intermediate
406 pages
9h 55m
English
Let's use the logistic regression classifier, which has already served us well in the Chapter 9, Classification II – Sentiment Analysis:
from sklearn.linear_model.logistic import LogisticRegressiondef create_model(): return LogisticRegression()
Just to mention one surprising aspect: the evaluation of accuracy rates when first switching from binary to multiclass classification. In binary classification problems, we have learned that an accuracy of 50% is the worst case, as it could have been achieved by random guessing. In multiclass settings, 50% can already be very good. With our six genres, for instance, random guessing would result in only 16.7% (equal class sizes assumed).
The full training procedure now looks ...
Read now
Unlock full access