# Tag Info

Accepted

### How to improve results from a Naive Bayes algorithm?

Your model certainly overfits. It's likely that the main issue is the inclusion in the features of words which appear very rarely (especially those which appear only once in the corpus): Words which ...
• 25.5k
Accepted

### Why naive bayes is "naive"

Naive Bayes doesn't assume independence of attributes ... It assumes conditional independence (or what you call independence within a class). This allows us to write the likelihood in the bayes rule P(...
• 44
1 vote

### Does it make sense to build a ROC curve for Naive Bayes classification?

Using metrics makes sense in the context of the task, not algorithms. After all, we do not train algorithms on quality metrics, but compare different models by quality metrics. That is, if this is a ...
• 406
1 vote
Accepted

### Stop words list to use for CountVectorization

import nltk from nltk.corpus import stopwords print(stopwords.words('english'))
• 858
1 vote

### Independence of Features assumption in Naive Bayes

Statistical independence is a pretty straightforward thing. If $$p(A\cap B) = p(A) p(B)$$ then $A$ and $B$ are independent (in other words if marginal distributions are equal to conditional). If you ...
1 vote

### Subtraction of Positive and Negative Frequencies in Sentiment Analysis

Let's take an example, consider two words A & B. A's positive/negative values are +1/0 and B's are +0.5/-0.5. Their difference would appear equivalent (diffAB = 1). When in fact they are quite ...
• 711
1 vote

### How to implement HashingVectorizer in multinomial naive bayes algorithim

In newer versions of sklearn, use HashingVectorizer(alternate_sign=False)
1 vote

### How to implement HashingVectorizer in multinomial naive bayes algorithim

It doesn't seem that non_negative is an argument in some versions. Try using decode_error = 'ignore'. If you're working with a ...
• 11
1 vote

### How to implement HashingVectorizer in multinomial naive bayes algorithim

You need to ensure that the hashing vector doesn't purpose negatives. The way to do this is via HashingVectorizer(non_negative=True).
• 2,430

Only top scored, non community-wiki answers of a minimum length are eligible