0% found this document useful (0 votes)
47 views13 pages

SENTIMENT ANALYSIS From Text and Image

This document summarizes algorithms for sentiment analysis from text and images. It discusses how sentiment analysis applies natural language processing and image analysis techniques to extract subjective information from text and images. The key algorithms covered are support vector machines, naive Bayes, maximum entropy, and K-nearest neighbors (KNN) applied to sentiment classification from text and images.

Uploaded by

ayushi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views13 pages

SENTIMENT ANALYSIS From Text and Image

This document summarizes algorithms for sentiment analysis from text and images. It discusses how sentiment analysis applies natural language processing and image analysis techniques to extract subjective information from text and images. The key algorithms covered are support vector machines, naive Bayes, maximum entropy, and K-nearest neighbors (KNN) applied to sentiment classification from text and images.

Uploaded by

ayushi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

ALGORITHMS FOR SENTIMENT ANALYSIS

FROM TEXT AND IMAGE

Presented by-
AYUSHI PRABHAKAR

1
SENTIMENT ANALYSIS FROM TEXT AND
IMAGE

“The practice of applying Natural Language


processing and text and image analysis techniques
to identify and extract subjective information from
a piece of text and a visual image.”

2
3
CONCEPTS OF TEXT CLASSIFICATION

• Tokenization: It is the name given to the process of chopping up


sentences into smaller pieces (words or tokens). 
• Word Normalization: It is the reduction of each word to its
base/stem form (by chopping of the affixes).
• Bag of words: In this, individual words are taken into account
and each word is given a specific subjectivity score.

4
5
SENTIMENT ANALYSIS TECHNIQUES
CLASSIFICATION

6
ALGORITHMS FOR SENTIMENT ANALYSIS FROM
TEXT

Support Vector Machine


classification algorithm
 Naïve Bayes algorithm
Maximum entropy algorithm

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

You might also like