SENTIMENT ANALYSIS From Text and Image
SENTIMENT ANALYSIS From Text and Image
Presented by-
AYUSHI PRABHAKAR
1
SENTIMENT ANALYSIS FROM TEXT AND
IMAGE
2
3
CONCEPTS OF TEXT CLASSIFICATION
4
5
SENTIMENT ANALYSIS TECHNIQUES
CLASSIFICATION
6
ALGORITHMS FOR SENTIMENT ANALYSIS FROM
TEXT
7
SUPPORT VECTOR MACHINE ALGORITHM
• SVM algorithm is a ‘simple’ linear
classification/regression algorithm. It tries to find
a hyperplane which separates the data in two classes as
optimally as possible.
Here as optimally as possible means that as much points
as possible of label A should be seperated to one side of
the hyperplane and as points of label B to the other side,
while maximizing the distance of each point to this
hyperplane..
8
NAÏVE BAYES ALGORITHM
• It is probabilistic classifier which requires small set of
training data to determine parameter prediction. Only
variance of feature is calculated because of independence
of features instead of calculating full covariance matrix.
Bayes theorem is defined as.
• P (c|d) = P(d|c) P (c) / P (d)
• d is review and c is class. For a given textual review ‘d’
and for a class ‘c’(positive, negative), the conditional
probability for each class given a review is P(c|d) .
9
MAXIMUM ENTROPY ALGORITHM
The principle behind Maximum Entropy is that the
correct distribution is the one that maximizes the Entropy /
uncertainty and still meets the constraints which are set by the
‘evidence’.
10
KNN ALGORITHM FOR SENTIMENT ANALYSIS
FROM IMAGE
• We will use x axis to denote a feature (aka. predictor, attribute) and y
axis to denote the target (aka. label, class) we are trying to predict.
• The idea is very simple: instead of finding the single closest image in
the training set, we will find the top k closest images, and have them
vote on the label of the test image. In particular, when k = 1, we
recover the Nearest Neighbor classifier. Intuitively, higher values
of k have a smoothing effect that makes the classifier more resistant
to outliers.
11
GIVEN AN IMAGE, PREDICT WHETHER IT CONTAINED A DOG
OR A CAT:
12
THANK YOU
13