Full Lecture W2

Probability and Bayes’s Rule

To calculate a probability of a certain event happening, you take the count of that specific event and you divide by the sum of all events. Furthermore, the sum of all probabilities has to equal 1.

Untitled

To compute the probability of 2 events happening, like "happy" and "positive" in the picture above, you would be looking at the intersection, or overlap of events. In this case red and blue boxes overlap in 3 boxes. So the answer is 3/20

Untitled

Bayes Rule

Untitled

Untitled

Untitled

Untitled

Untitled

Naïve Bayes for Sentiment Analysis

It's called naive because this method makes the assumption that the features you're using for classification are all independent.

Untitled

Untitled