www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Sentiment Analysis
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What Will You Learn Today?
Why Sentiment
Analysis?
What is Machine
Learning?
What is Sentiment
Analysis?
How Sentiment
Analysis Works?
Sentiment Analysis -
Demo
1 2 3
4 65
Sentiment Analysis –
Use Case
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What is Machine Learning?
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What is Machine Learning?
Machine learning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being
explicitly programmed. Machine learning focuses on the development of computer programs that can change when
exposed to new data.
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What is Machine Learning?
Types of Machine Learning:
Supervised
Learning
Reinforcement
Learning
Unsupervised
Learning
Types of Learning
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What is Machine Learning?
Types of Machine Learning:
Supervised
Learning
Reinforcement
Learning
Unsupervised
Learning
Types of Learning
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What is Machine Learning?
Types of Machine Learning:
Supervised
Learning
Reinforcement
Learning
Unsupervised
Learning
Types of Learning
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What is Machine Learning?
Types of Machine Learning:
Supervised
Learning
Reinforcement
Learning
Unsupervised
Learning
Types of Learning
Sentiment Analysis
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Why Sentiment Analysis?
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Why Sentiment Analysis?
Let’s take an example here:
Suppose you have an application which is very famous, and has around a billion users, and you decide to add a new
functionality to your application, how will you get the feedback for it?
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Why Sentiment Analysis?
Let’s take an example here:
Suppose you have an application which is very famous, and has around a billion users, and you decide to add a new
functionality to your application, how will you get the feedback for it?
Comes in, Sentiment Analysis, so now you can focus on your negative posts, and improve your application!! Cool Right?
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What is Sentiment Analysis?
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What is Sentiment Analysis?
The process of computationally identifying and categorizing opinions expressed in a piece of text, especially in order to
determine whether the writer's attitude towards a particular topic, product, etc. is positive, negative, or neutral.
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
What is Sentiment Analysis?
The process of computationally identifying and categorizing opinions expressed in a piece of text, especially in order to
determine whether the writer's attitude towards a particular topic, product, etc. is positive, negative, or neutral.
Remember this?
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
How does it work?
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
How does it work?
Good Question! It’s very simple though.
Positive
Words
Negative
Words
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
How does it work?
Good Question! It’s very simple though.
Database
Positive
Words
Negative
Words
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
How does it work?
Good Question! It’s very simple though.
Score
+1 for good
-1 for bad
0 for neutral
Positive
Words
Negative
Words
Sample Statement Neutral Sentences
Positive Sentences
Negative Sentences
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
How Does the Algorithm Work?
Positive
Words
Negative
Words
This is a sample statement
*The words that are neither in positive nor in negative words would be neutral words with value 0
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Sentiment Analysis : Example
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Let’s take a sample statement here, with sample datasets.
Sentiment Analysis Example
The Iphone7 is awesome! = +1
Good
Awesome
Great
Happy
Yes
Interesting
Bad
Hate
Sad
Least
Not
Boring
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Let’s take a sample statement here, with sample datasets.
Sentiment Analysis Example
This movie is not that great, after the interval it was boring! = -1 +1 -1 = -1
Good
Awesome
Great
Happy
Yes
Interesting
Bad
Hate
Sad
Least
Not
Boring
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Let’s take a complex statement now,
Sentiment Analysis Example
The service was terrible, but the food was great!
Now how will you solve this?
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Let’s take a complex statement now,
Sentiment Analysis Example
Such a case is called Constructive Conjunction.
The service was terrible, but the food was great!
The way we solve it is like this, whenever there is a BUT in the sentence, it reforms the sentence like this,
The service was terrible AND But the food was great!
1. 2.
Hence, calculate their scores separately, this method is called Binary Sentiment Analysis
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Demo in R
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Demo in R
We are going to do an El Clasico comparison of Real Madrid and Barcelona and see who is getting more positive tweets.
BarcelonaReal Madrid C.F
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Sentiment Analysis : Use Case
www.edureka.co/data-scienceEdureka’s Data Science Certification Training
Sentiment Analysis: Use Case
Enhancing Customer Experience
Customer experiences fall into three basic categories,
positive, negative or neutral.
Through sentiment analysis, companies can detect the
tone and temperament of each and every word found
in a customer’s social postings.
With this, businesses can gain valuable insights into
what they are doing right with regard to products,
services and customer support and what they need to
work on negative sentiments in order to enhance the
overall customer experience.
www.edureka.co/data-scienceEdureka’s Data Science Certification Training

Sentiment Analysis | Machine Learning Algorithms | Data Science Tutorial | Edureka