0% found this document useful (0 votes)
9 views5 pages

Lab 3 Sentimental Analysis

The document discusses performing sentiment analysis on a Netflix dataset. While traditional sentiment analysis is not applicable, various visualizations and insights can still be generated from the data, including distributions of content types, release years, countries of origin, ratings, and genres.

Uploaded by

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

Lab 3 Sentimental Analysis

The document discusses performing sentiment analysis on a Netflix dataset. While traditional sentiment analysis is not applicable, various visualizations and insights can still be generated from the data, including distributions of content types, release years, countries of origin, ratings, and genres.

Uploaded by

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

MACHINE LEARNING

LAB EX-3 SENTIMENTAL ANALYSIS


DEEPIKA L 20BIT007
KAVIYA S 20BIT025
SENTIMENTAL ANALYSIS:
Sentiment analysis typically involves classifying text data into sentiment categories, such as
positive, negative, or neutral, to understand the sentiment or emotion expressed in the text.
However, the dataset you provided seems to be related to Netflix titles, and it doesn't contain
textual data that directly represents sentiment. Therefore, traditional sentiment analysis may
not be applicable to this dataset.
DATASET:
Netflix is one of the most popular media and video streaming platforms. They have over 8000
movies or tv shows available on their platform, as of mid-2021, they have over 200M Subscribers
globally. This tabular dataset consists of listings of all the movies and tv shows available on
Netflix, along with details such as - cast, directors, ratings, release year, duration, etc.
Instead, we can explore the dataset and generate graphs and insights related to the Netflix titles.
Here are some analyses and visualizations we can perform:

Distribution of Content Types (Movies vs. TV Shows):

We can create a bar chart to visualize the distribution of content types (Movies and TV Shows) in
the dataset. This will show how many of each type are available on Netflix.
import matplotlib.pyplot as plt
import seaborn as sns

# Distribution of Content Types


sns.countplot(data=data, x='type')
plt.title('Distribution of Content Types')
plt.xlabel('Content Type')
plt.ylabel('Count')
plt.show()

the bar plot shows the top 10 most popular genres on Netflix based on the available content. It
gives us insights into which types of shows and movies are widely available on the platform,
reflecting user preferences and helping Netflix make decisions about content strategy.

Release Year Distribution:


• Create a histogram or line chart to show the distribution of content based on
release years. This can give insights into how the content library has grown
over the years.

plt.figure(figsize=(10, 6))
sns.histplot(data=data, x='release_year', bins=30)
plt.title('Release Year Distribution')
plt.xlabel('Release Year')
plt.ylabel('Count')
plt.xticks(rotation=45)
plt.show()
the bar plot indicates that Netflix offers a diverse range of content genres. Genres like
dramas, comedies, and documentaries are highly prevalent, suggesting strong user
interest. This information guides Netflix's content strategy and improves content
recommendations for users.

Top Countries for Content Production:


• Plot a bar chart to display the top countries where the content in the dataset
originates from. This can help identify the countries with the most
representation on Netflix.

top_countries = data['country'].value_counts().head(10)
plt.figure(figsize=(10, 6))
sns.barplot(x=top_countries.index, y=top_countries.values)
plt.title('Top Countries for Content Production')
plt.xlabel('Country')
plt.ylabel('Count')
plt.xticks(rotation=45)
plt.show()

The bar chart indicates that the United States is the leading producer of content on Netflix,
followed by several other countries. This diversity reflects Netflix's commitment to offering a
wide range of content to its international audience, shaping its content strategy, and tailoring
recommendations to regional preferences.
Rating Distribution:
• Visualize the distribution of content ratings (e.g., PG, TV-MA) using a bar
chart or pie chart. This can show the diversity of content ratings available.

sns.countplot(data=data, x='rating')
plt.title('Rating Distribution')
plt.xlabel('Content Rating')
plt.ylabel('Count')
plt.xticks(rotation=45)
plt.show()
From the graph,"Rating Distribution" count plot reveals a diverse range of content ratings on
Netflix, catering to various age groups and preferences. TV-MA is notably common,
indicating a significant amount of mature content. Netflix uses these ratings to target different
audiences and curate its content library for personalized recommendations.

Genres Distribution:
• Create a bar chart to display the distribution of content across different genres
(listed_in column). This can help identify popular genres on Netflix.

top_genres = data['listed_in'].value_counts().head(10)
plt.figure(figsize=(10, 6))
sns.barplot(x=top_genres.values, y=top_genres.index)
plt.title('Top 10 Genres on Netflix')
plt.xlabel('Count')
plt.ylabel('Genre')
plt.show()

The "Top 10 Genres on Netflix" bar chart reveals the most popular content genres on the
platform. It reflects the diversity of content available, user preferences, and helps Netflix
shape its content strategy and recommendations for its audience.

You might also like