Would you prefer gradient boosting trees model or logistic regression when doing text classification with bag of words?
NLPLevel: IntermediateText classification
Would you prefer gradient boosting trees model or logistic regression when doing text classification with bag of words?
Hints
- Separate the linear score from the function mapping it to a probability.
- Connect the target distribution to its negative log-likelihood.
Answer
Usually logistic regression is better because bag of words creates a matrix with large number of columns. For a huge number of columns logistic regression is usually faster than gradient boosting trees.
Source and licence: Alexey Grigorev & contributors — Data Science Interviews · CC-BY-4.0