<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hitesh Taneja on Medium]]></title>
        <description><![CDATA[Stories by Hitesh Taneja on Medium]]></description>
        <link>https://medium.com/@hiteshtaneja?source=rss-cc287853de8f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*F_RbGeQFrM5dz-AuAz7-bQ@2x.jpeg</url>
            <title>Stories by Hitesh Taneja on Medium</title>
            <link>https://medium.com/@hiteshtaneja?source=rss-cc287853de8f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 16:10:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hiteshtaneja/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[In-Depth Guide to Cook’s Distance]]></title>
            <link>https://medium.com/@hiteshtaneja/in-depth-guide-to-cooks-distance-40697cda2c9d?source=rss-cc287853de8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/40697cda2c9d</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[linkedin]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[outliers]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Hitesh Taneja]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 17:37:09 GMT</pubDate>
            <atom:updated>2023-10-26T17:37:09.007Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Cook’s Distance is a statistical measure used to identify influential observations in your data set when fitting a linear regression model. While other methods like the Interquartile Range (IQR) are more commonly used for general outlier detection, Cook’s Distance specifically helps you understand the influence of each data point on your regression model. In this guide, we’ll delve deep into Cook’s Distance, its calculation, and its practical applications.</p><h3>What is Cook’s Distance?</h3><p>Cook’s Distance is an aggregate measure that assesses the influence of each observation on the overall regression model. In simpler terms, it helps you understand how much your model would change if you were to remove a particular data point. The larger the Cook’s Distance, the more influential the point is.</p><h3>Why Use Cook’s Distance?</h3><ol><li>Model Integrity: By identifying influential points, you can make a more informed decision about whether to keep them or treat them as outliers.</li><li>Predictive Accuracy: Removing influential points that are considered outliers can improve the model’s predictive accuracy.</li><li>Assumption Validation: It helps validate the assumptions of linearity, Equal Variance, and Normality in the residuals.</li></ol><h3>Calculating Cook’s Distance</h3><p>The formula for Cook’s Distance <em>D(i)</em>​ for the i<em>(th)</em> observation is given by:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*zINIH0rZ-ynD_A-ViaDRyA.png" /></figure><p>Where is the predicted value for the <em>j(th)</em> observation, <em>Y</em>^<em>j</em>(<em>i</em>)​ is the predicted value for the <em>j(th)</em> observation without the <em>j(th)</em> observation in the model, <em>p</em> is the number of predictors, and <em>MSE</em> is the Mean Squared Error of the model.</p><ul><li><em>Di</em>: Cook’s Distance for the <em>i(th)</em> observation</li><li>Σ: The sum symbol, indicating that we sum up the squared differences for all <em>n</em> observations</li><li><em>j</em>=1 to <em>n</em>: Indicates that the sum goes from the first observation to the <em>n(th)</em> (last) observation</li><li><em>Y</em>^<em>j</em>: The predicted value of the dependent variable for the <em>j(th)</em> observation, using all data points</li><li><em>Y</em>^<em>j</em>(<em>i</em>): The predicted value of the dependent variable for the <em>j(th)</em> observation, when the <em>i(th)</em> observation is removed</li><li><em>p</em>: The number of predictor variables in the model, including the constant term</li><li><em>MSE</em>: Mean Squared Error, an average of the squares of the residuals for the model</li></ul><h3>Interpreting Cook’s Distance</h3><p>A common rule of thumb is that any data point with a Cook’s Distance larger than 1 is considered highly influential and should be closely examined.</p><ul><li><em>Di</em>​&lt;1: Low influence</li><li>0.5&lt;<em>Di</em>​&lt;1: Moderate influence</li><li><em>Di</em>​&gt;1: High influence</li></ul><h3>Scenario:</h3><p>Imagine you are working on a dataset that contains the following information about monthly sales revenue for a retail store:</p><ul><li>Month</li><li>Advertising Expense</li><li>Monthly Sales Revenue</li></ul><p>Your goal is to create a linear regression model to predict Monthly Sales Revenue based on Advertising Expenses.</p><p>Here’s a sample of your data:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*aPDJw5gGIa6QgHA4cq1Iyg.png" /></figure><h3>Step 1: Fit the Initial Model</h3><p>First, fit a linear regression model using all the data points. This will give you the initial predicted values <em>Y</em>^<em>j</em>​ and the Mean Squared Error (MSE) for the entire model.</p><h3>Step 2: Fit Models Without Each Point</h3><p>For each observation <em>i</em>, fit a new model without that observation. This will give you the predicted values <em>Y^j(i) </em>​ for each model that excludes the i(th) observation.</p><h3>Step 3: Calculate Cook’s Distance</h3><p>Using the formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*zINIH0rZ-ynD_A-ViaDRyA.png" /></figure><p>Calculate Cook’s Distance for each observation <em>i</em>.</p><h4>For January (assuming p=1 and MSE=2500):</h4><ul><li><em>Y</em>^<em>j</em>​ (with Jan) = 51000</li><li><em>Y</em>^<em>j</em>(1)​ (without Jan) = 50500</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/0*RH5G_ELFeSladBCd.png" /></figure><p>Based on our rule of thumb, a Cook’s Distance of &gt;1 is considered highly influential. Therefore, the data point for January should be closely examined.</p><p><strong>Calculations:</strong></p><ol><li><em>Y</em>^<em>j</em>​ (Predicted Value with all data points): This is the predicted monthly sales revenue when all data points are included in the model. For January, let’s say it’s 51,000.</li><li><em>Y</em>^<em>j</em>(<em>i</em>)​ (Predicted Value without <em>ith</em> data point): This is the predicted value when the model is fitted without the <em>ith</em> data point. For January, let’s say this is 50,500.</li><li><em>p</em> (Number of Predictors): For our example with one independent variable (Advertising Expense), <em>p</em>=1+1 (one for the variable and one for the intercept) = 2.</li><li><em>MSE</em> (Mean Squared Error): This is the average of the squares of the errors or deviations. For our example, let’s assume it is 2,500.</li></ol><h3>Conclusion</h3><p>Cook’s Distance is a powerful yet often overlooked tool in regression diagnostics. It offers a nuanced way to identify influential data points that could skew your model. Next time you’re fitting a linear regression model, consider calculating Cook’s Distance to ensure the robustness and reliability of your predictive insights.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40697cda2c9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Exploration and Visualisation — Netflix]]></title>
            <link>https://medium.com/@hiteshtaneja/data-exploration-and-visualisation-netflix-5e987bc6f150?source=rss-cc287853de8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e987bc6f150</guid>
            <category><![CDATA[netflix]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[case-study]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Hitesh Taneja]]></dc:creator>
            <pubDate>Mon, 16 Oct 2023 08:27:22 GMT</pubDate>
            <atom:updated>2023-10-16T08:35:20.089Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Exploration and Visualisation — Netflix</h3><blockquote><strong>What is this case study?</strong><br>The study focuses on analyzing a rich dataset that includes various attributes of movies and TV shows available on Netflix. The attributes range from the title, director, and cast to more nuanced data like release year, rating, and description. The primary aim is to extract actionable insights that could help Netflix make informed decisions about content creation, curation, and distribution.</blockquote><p>Netflix stands out as a leading powerhouse in the realm of media and video streaming platforms. As of mid-2021, this platform boasted an extensive library, offering a staggering selection of over 10,000 movies and TV shows for its global audience to enjoy. Impressively, Netflix’s reach extended to over 222 million subscribers across the globe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Uo-qdJeavpiOgl5g" /><figcaption>Photo by <a href="https://unsplash.com/@thibaultpenin?utm_source=medium&amp;utm_medium=referral">Thibault Penin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote><strong>Why?</strong></blockquote><blockquote>The ultimate goal is to help Netflix maximize its ROI on content, grow its subscriber base, and enhance customer satisfaction. This is achieved by identifying gaps in the content library, understanding viewer preferences across various dimensions (genre, country, seasonality, etc.), and making data-backed recommendations for future strategy.</blockquote><p>That is a little bit I know about Netflix, Let&#39;s now dive deep into the dataset which I have for better understanding. Notebook <a href="https://www.kaggle.com/code/hiteshtaneja/netflix-business-case-study">Link</a>.</p><pre># Importing necessary libraries<br>import pandas as pd<br>import numpy as np<br>import matplotlib.pyplot as plt<br>import seaborn as sns<br><br># Load the dataset<br>dataset_path = &#39;/mnt/data/netflix_dataset.csv&#39;<br>netflix_data = pd.read_csv(dataset_path)<br><br># Display first few rows of the dataset<br>netflix_data.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fl6zGjHe3Qr79xL4HjASYQ.png" /></figure><p><em>For this analysis, we’ll use Python and rely on libraries like Pandas, NumPy, Matplotlib, and Seaborn.</em></p><p>Contained within this tabular dataset are comprehensive listings of all the movies and TV shows available on Netflix. This data provides a wealth of information, including details about the cast, directors, ratings, release years, durations, and more, enhancing the viewing experience for Netflix users worldwide.</p><h3><strong>Basic Metrics</strong></h3><p>Firstly, let’s examine the shape and basic statistics of the dataset.</p><p>Dataset Shape and Data Types: Let’s check the shape and data types of the dataset.</p><pre># Checking the shape of the dataset<br>dataset_shape = netflix_data.shape<br><br># Checking data types of the attributes<br>dataset_dtypes = netflix_data.dtypes<br><br>dataset_shape, dataset_dtypes<br><br>## Result<br># ((8807, 12),<br>#  show_id         object<br>#  type            object<br>#  title           object<br>#  director        object<br>#  cast            object<br>#  country         object<br>#  date_added      object<br>#  release_year     int64<br>#  rating          object<br>#  duration        object<br>#  listed_in       object<br>#  description     object<br>#  dtype: object)</pre><p>The dataset consists of 8,807 entries with 12 attributes:</p><ul><li><strong>show_id:</strong> Unique ID for every Movie / TV show</li><li><strong>type:</strong> Identifier — A Movie or TV Show</li><li><strong>title:</strong> Title of the Movie / TV Show</li><li><strong>director:</strong> Director of the Movie</li><li><strong>cast:</strong> Actors involved in the movie/show</li><li><strong>country:</strong> The country where the movie/show was produced</li><li><strong>date_added:</strong> Date it was added on Netflix</li><li><strong>release_year:</strong> Actual Release year of the movie/show</li><li><strong>rating:</strong> TV Rating of the movie/show</li><li><strong>duration:</strong> Total Duration — in minutes or number of seasons</li><li><strong>listed_in:</strong> Genre</li><li><strong>description:</strong> The summary description</li></ul><p>These are some common fields that we can see on Netflix.</p><h3>Analyzing Basic Metrics</h3><pre># Displaying basic metrics using the describe() method for numerical columns<br>basic_metrics_numerical = netflix_data.describe()<br><br># Displaying basic metrics for categorical columns like &#39;Type&#39;, &#39;Country&#39;, and &#39;Rating&#39;<br>basic_metrics_categorical = netflix_data[[&#39;type&#39;, &#39;country&#39;, &#39;rating&#39;]].describe(include=[&#39;object&#39;])<br><br>basic_metrics_numerical, basic_metrics_categorical<br></pre><h4>Numerical Attributes</h4><p>For the numerical attribute release_year:</p><ul><li>Count: 8,807 entries</li><li>Mean: Around the year 2014</li><li>Standard Deviation: Approximately 8.82 years</li><li>Minimum: Year 1925</li><li>25th Percentile (Q1): Year 2013</li><li>Median (50th Percentile): Year 2017</li><li>75th Percentile (Q3): Year 2019</li><li>Maximum: Year 2021</li></ul><h4>Categorical Attributes</h4><p>For the categorical attributes type, country, and rating:</p><p>Type</p><ul><li>Count: 8,807</li><li>Unique Values: 2 (Movie, TV Show)</li><li>Most Frequent: Movie</li><li>Frequency: 6,131</li></ul><p>Country</p><ul><li>Count: 7,976 (some missing values)</li><li>Unique Values: 748</li><li>Most Frequent: United States</li><li>Frequency: 2,818</li></ul><p>Rating</p><ul><li>Count: 8,803 (some missing values)</li><li>Unique Values: 17</li><li>Most Frequent: TV-MA</li><li>Frequency: 3,207</li></ul><h4>Observations</h4><ul><li>The average release_year being around 2014, along with a median of 2017, suggests that Netflix has a lot of content from the recent decade.</li><li>The high frequency of Movies compared to TV Shows indicates a stronger focus on movie content.</li><li>The United States appears to be the most common country for content production, followed by a wide range of other countries, indicating a diverse content catalog.</li><li>The rating “TV-MA” is the most frequent, suggesting a focus on mature audiences.</li></ul><p>These basic metrics offer a snapshot of the kind of content that is prevalent on Netflix, which can be quite informative for various business decisions.</p><pre># Convert categorical attributes to &#39;category&#39; data type if required<br>categorical_columns = [&#39;type&#39;, &#39;country&#39;, &#39;rating&#39;]<br>netflix_data[categorical_columns] = netflix_data[categorical_columns].astype(&#39;category&#39;)<br><br># After conversion data types<br>after_conversion_data_types = netflix_data.dtypes<br># Missing value detection<br>missing_values = netflix_data.isnull().sum()</pre><h4>Data Types of All the Attributes (Before Conversion)</h4><ul><li>Most of the attributes are of object data type, except release_year, which is an int64.</li></ul><h4>Conversion of Categorical Attributes to ‘Category’</h4><ul><li>The data types for type, country, and rating have been converted to category.</li></ul><h4>Missing Value Detection</h4><ul><li>director: 2,634 missing values</li><li>cast: 825 missing values</li><li>country: 831 missing values</li><li>date_added: 10 missing values</li><li>rating: 4 missing values</li><li>duration: 3 missing values</li></ul><h3>Non-Graphical Analysis: Value Counts and Unique Attributes</h3><pre># Non-Graphical Analysis: Value counts for key attributes<br>value_counts_type = netflix_data[&#39;type&#39;].value_counts()<br>value_counts_country = netflix_data[&#39;country&#39;].value_counts().head(10)  # Top 10 countries<br>value_counts_rating = netflix_data[&#39;rating&#39;].value_counts()<br>value_counts_release_year = netflix_data[&#39;release_year&#39;].value_counts().head(10)  # Top 10 release years<br><br># Unique attributes for key columns<br>unique_type = netflix_data[&#39;type&#39;].unique()<br>unique_country = netflix_data[&#39;country&#39;].unique()<br>unique_rating = netflix_data[&#39;rating&#39;].unique()<br>unique_release_year = netflix_data[&#39;release_year&#39;].unique()<br><br>value_counts_type, value_counts_country, value_counts_rating, value_counts_release_year, unique_type, unique_country, unique_rating, unique_release_year</pre><h4>Value Counts</h4><p><strong>Type of Content (Movies vs. TV Shows)</strong></p><ul><li>Movies: 6,131</li><li>TV Shows: 2,676</li></ul><p><strong>Top 10 Countries Producing Content</strong></p><ul><li>United States: 2,818</li><li>India: 972</li><li>United Kingdom: 419</li><li>Japan: 245</li><li>South Korea: 199</li><li>Canada: 181</li><li>Spain: 145</li><li>France: 124</li><li>Mexico: 110</li><li>Egypt: 106</li></ul><p><strong>Ratings</strong></p><ul><li>TV-MA: 3,207</li><li>TV-14: 2,160</li><li>TV-PG: 863</li><li>R: 799</li><li>PG-13: 490</li><li>…</li></ul><p><strong>Top 10 Release Years</strong></p><ul><li>2018: 1,147</li><li>2017: 1,032</li><li>2019: 1,030</li><li>2020: 953</li><li>2016: 902</li><li>…</li></ul><h4>Unique Attributes</h4><ol><li>Type: 2 unique values (‘Movie’, ‘TV Show’)</li><li>Country: 748 unique values</li><li>Rating: 17 unique values</li><li>Release Year: Ranges from 1925 to 2021</li></ol><h4>Observations</h4><ul><li>The platform predominantly offers movies, almost twice as many as TV Shows.</li><li>The United States is the leading country in producing content, followed by India and the United Kingdom.</li><li>The most common ratings are ‘TV-MA’ and ‘TV-14’, indicating a focus on mature and teen audiences.</li><li>Most of the content was released in the years 2018, 2017, and 2019, showing a strong focus on recent content.</li></ul><p>This non-graphical analysis provides a solid foundation for understanding the overall composition of the dataset. It also offers valuable insights into the types of content that are most prevalent on Netflix.</p><h3>Missing Value &amp; Outlier Check</h3><p>Before we proceed further with additional visualizations, it’s crucial to check for missing values and outliers.</p><h4>Missing Values</h4><p>Let’s first check for missing values in the dataset.</p><pre># Checking for missing values<br>missing_values = netflix_data.isnull().sum()<br>missing_values</pre><h4>Observations:</h4><p>We have missing values in several columns:</p><ul><li>director: 2,634 missing values</li><li>cast: 825 missing values</li><li>country: 831 missing values</li><li>date_added: 10 missing values</li><li>rating: 4 missing values</li><li>duration: 3 missing values</li></ul><p>Given the nature of our analysis, these missing values may or may not significantly impact the outcome. For example, missing director or cast information may not be crucial for our current business questions.</p><h3>Outliers</h3><p>For the purpose of this analysis, we’ll focus on the release_year as our primary numerical variable. Let&#39;s check for outliers using a boxplot.</p><pre># Boxplot to check for outliers in &#39;release_year&#39;<br>plt.figure(figsize=(10, 4))<br>sns.boxplot(x=netflix_data[&#39;release_year&#39;])<br>plt.title(&#39;Boxplot for Release Year to Check for Outliers&#39;)<br>plt.show()</pre><h4>Observations:</h4><p>The boxplot for release_year shows no significant outliers, indicating that the data for this attribute is relatively consistent.</p><h3>Univariate Analysis</h3><h4>Countplot for Type of Content</h4><p>Let’s start by understanding the distribution of Movies vs. TV Shows on Netflix.</p><pre># Univariate Example with Pie Chart for &#39;Type&#39; (Movie/TV Show)<br>type_counts = netflix_data[&#39;type&#39;].value_counts()<br>labels = type_counts.index<br>sizes = type_counts.values<br><br>plt.figure(figsize=(8, 8))<br>plt.pie(sizes, labels=labels, autopct=&#39;%1.1f%%&#39;, startangle=90)<br>plt.title(&#39;Distribution of Content Types: Movies vs. TV Shows&#39;)<br>plt.axis(&#39;equal&#39;)  # Equal aspect ratio ensures that pie is drawn as a circle.<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*FkyV0ersg268RdJjrMys_w.png" /><figcaption>Pie Chart for ‘Type’</figcaption></figure><h4>Observations:</h4><ul><li>The count of Movies is significantly higher than that of TV Shows, indicating that Netflix has a more extensive catalog of movies.</li></ul><h4>Countplot for Rating</h4><pre># Countplot for Rating<br>plt.figure(figsize=(14, 6))<br>sns.countplot(x=&#39;rating&#39;, data=netflix_data, order=netflix_data[&#39;rating&#39;].value_counts().index, palette=&#39;Set3&#39;)<br>plt.title(&#39;Count of Content by Rating&#39;)<br>plt.xlabel(&#39;Rating&#39;)<br>plt.ylabel(&#39;Count&#39;)<br>plt.xticks(rotation=45)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4XL_zAc-5BrDhdPSn9SmIA.png" /><figcaption>Countplot for Rating</figcaption></figure><h4>Observations:</h4><ul><li>The majority of the content is rated “TV-MA” followed by “TV-14”, indicating a focus on mature audiences and teenagers.</li></ul><h4>Top 10 Most Frequent Directors on Netflix</h4><p>The bar chart illustrates the top 10 directors with the most titles on Netflix:</p><pre>top_directors = unnested_director[&#39;director&#39;].value_counts().head(10)<br><br># Visualizing the top 10 directors with a bar chart<br>plt.figure(figsize=(14, 8))<br>sns.barplot(y=top_directors.index, x=top_directors.values, palette=&#39;viridis&#39;)<br>plt.title(&#39;Top 10 Most Frequent Directors on Netflix&#39;)<br>plt.xlabel(&#39;Number of Titles&#39;)<br>plt.ylabel(&#39;Director&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFysffkzy-1QJ3okoE8WIA.png" /><figcaption>top 10 directors with the most titles</figcaption></figure><h4>Distplot &amp; Histogram for Release Years</h4><pre># Distplot for release_year<br>plt.figure(figsize=(10, 6))<br>sns.distplot(netflix_data[&#39;release_year&#39;], kde=True, bins=30)<br>plt.title(&#39;Distribution of Release Years&#39;)<br>plt.xlabel(&#39;Release Year&#39;)<br>plt.ylabel(&#39;Density&#39;)<br>plt.show()<br><br># Histogram for release_year<br>plt.figure(figsize=(10, 6))<br>plt.hist(netflix_data[&#39;release_year&#39;], bins=30, edgecolor=&#39;black&#39;)<br>plt.title(&#39;Histogram of Release Years&#39;)<br>plt.xlabel(&#39;Release Year&#39;)<br>plt.ylabel(&#39;Frequency&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*9NVuJBhECLBuK_JyUa_z6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*vIVNFRoYyPaCL37DLJsT_w.png" /></figure><h4><strong>Observations:</strong></h4><p>The distribution of release years is right-skewed, indicating that most of the content on Netflix is relatively new, with a significant amount released in the last decade.</p><h4>Countplot for Top 10 Most Frequent Release Years</h4><pre># Countplot for top 10 release years<br>plt.figure(figsize=(10, 6))<br>sns.countplot(data=netflix_data, x=&#39;release_year&#39;, order=netflix_data[&#39;release_year&#39;].value_counts().iloc[:10].index)<br>plt.title(&#39;Top 10 Most Frequent Release Years&#39;)<br>plt.xlabel(&#39;Release Year&#39;)<br>plt.ylabel(&#39;Count&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*62zXTzYBVKwESSQ3vXPpVA.png" /></figure><p>The top 10 most frequent release years are all from the recent past, with the year 2018 having the most content.</p><h3>Bivariate Analysis</h3><h4>Relationship Between Type and Rating</h4><pre># Countplot for Type vs Rating<br>plt.figure(figsize=(14, 6))<br>sns.countplot(x=&#39;rating&#39;, hue=&#39;type&#39;, data=netflix_data, order=netflix_data[&#39;rating&#39;].value_counts().index, palette=&#39;Set1&#39;)<br>plt.title(&#39;Count of Movies vs. TV Shows by Rating&#39;)<br>plt.xlabel(&#39;Rating&#39;)<br>plt.ylabel(&#39;Count&#39;)<br>plt.xticks(rotation=45)<br>plt.legend(title=&#39;Type&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3pbZSW2I0ciQ0Yy2OJwZQ.png" /><figcaption>Countplot for Type vs. Rating</figcaption></figure><h4>Observations:</h4><ul><li>Both Movies and TV Shows predominantly fall under the “TV-MA” and “TV-14” ratings.</li><li>The distribution of ratings between Movies and TV Shows is somewhat similar, though Movies have a higher count in most rating categories.</li></ul><h4>Relationship Between Rating and Release Year</h4><pre># Boxplot for rating vs. release_year<br>plt.figure(figsize=(14, 8))<br>sns.boxplot(x=&#39;rating&#39;, y=&#39;release_year&#39;, data=netflix_data, palette=&#39;Set1&#39;)<br>plt.title(&#39;Distribution of Release Years by Rating&#39;)<br>plt.xlabel(&#39;Rating&#39;)<br>plt.ylabel(&#39;Release Year&#39;)<br>plt.xticks(rotation=45)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tzJeO6pUsLrDYkzpWwsWjw.png" /></figure><h4>Observations:</h4><ul><li>The boxplot shows that the median release year for most ratings is relatively recent.</li><li>Content with ratings “TV-Y” and “TV-Y7” tends to be older compared to other ratings.</li></ul><h4>Relationship Between Type and Release Year</h4><pre># Boxplot for type vs. release_year<br>plt.figure(figsize=(10, 6))<br>sns.boxplot(x=&#39;type&#39;, y=&#39;release_year&#39;, data=netflix_data, palette=&#39;Set2&#39;)<br>plt.title(&#39;Distribution of Release Years by Content Type&#39;)<br>plt.xlabel(&#39;Type&#39;)<br>plt.ylabel(&#39;Release Year&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*PN6ijHYsEczpn_qZg7v3wA.png" /></figure><h3>Correlation Analysis: Heatmaps and Pairplots</h3><h4>Heatmap for Correlation Matrix</h4><p>We only have one continuous variable: release_year. Therefore, the heatmap for the correlation matrix is not very informative. The diagonal elements are always 1 because any variable is perfectly correlated with itself.</p><pre># Heatmap for correlation matrix<br>correlation_matrix = netflix_data.corr()  # Since we have only one continuous variable, this won&#39;t be much informative<br><br>plt.figure(figsize=(10, 6))<br>sns.heatmap(correlation_matrix, annot=True, cmap=&#39;coolwarm&#39;)<br>plt.title(&#39;Heatmap for Correlation Matrix&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*ZghZR9QOSmylhbbSbwjNsw.png" /></figure><h4>Pairplot for Continuous Variables</h4><p>Similarly, the pairplot only shows a single scatter plot for release_year because we only have that one continuous variable. It doesn&#39;t provide much information beyond what we&#39;ve already seen in the histogram and distplot.</p><pre># Pairplot (only release_year is a continuous variable in the cleaned dataset)<br>sns.pairplot(netflix_data[[&#39;release_year&#39;]], kind=&#39;scatter&#39;, height=6, aspect=2)<br>plt.title(&#39;Pairplot for Continuous Variables: Release Year&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ji7Lwuz9PL74xE40yxKqUQ.png" /></figure><h3>Data-Backed Business Insights</h3><h4>1. Content Diversity</h4><ul><li>Quantifiable Insight: Netflix’s catalog is diversified with productions from 748 unique countries and covers a wide array of genres. The top three countries contributing to the content are the United States (2,818 titles), India (972 titles), and the United Kingdom (419 titles).</li><li>Business Interpretation: This broad geographical and genre-based diversity suggests that Netflix is well-positioned to cater to a global audience with varied tastes. This is a strong asset for market penetration and customer retention.</li></ul><h4>2. Focus on Recent Content</h4><ul><li>Quantifiable Insight: A significant chunk of Netflix’s content has been released in recent years. For instance, the years 2018, 2017, and 2019 collectively account for 3,209 titles, making up approximately 36.4% of the total catalog. Additionally, the median release year for TV Shows is more recent compared to Movies.</li><li>Business Interpretation: This focus on newer content likely aligns with current viewer preferences for fresh and relevant material. It also indicates that Netflix is actively keeping its content up-to-date, which is essential for maintaining subscriber interest and attracting new customers.</li></ul><h4>3. Ratings and Target Demographic</h4><ul><li>Quantifiable Insight: The ratings ‘TV-MA’ and ‘TV-14’ dominate the content on Netflix, with 3,207 and 2,160 titles respectively. These two ratings alone make up around 61.2% of all content.</li><li>Business Interpretation: The predominance of these ratings suggests that Netflix’s primary target demographic is mature and teen audiences. Content strategies targeting these demographics are likely to be more successful.</li></ul><h3>Data-Backed Recommendations</h3><h4>1. Expand Older TV Show Portfolio</h4><ul><li>Quantifiable Insight: The median release year for TV Shows is more recent compared to Movies. Only a small fraction, let’s say around 10%, of the TV Shows available, were released before the year 2000.</li><li>Recommendation: Given this focus on newer TV Shows, Netflix could consider adding more classic TV Shows to its catalog to attract a broader age group, including older adults who may have nostalgia for older series.</li></ul><h4>2. Regional Customization</h4><ul><li>Quantifiable Insight: Content from the United States, India, and the United Kingdom makes up nearly 50% of the entire Netflix catalog.</li><li>Recommendation: With content available from 748 different countries, Netflix has the opportunity to further customize its offerings based on regional popularity. This could lead to an increase in local subscriptions and customer satisfaction.</li></ul><h4>3. Explore Underrepresented Genres and Ratings</h4><ul><li>Quantifiable Insight: Ratings ‘TV-MA’ and ‘TV-14’ account for 61.2% of all content. Genres like Documentaries and Children’s Movies are less frequent in the catalog.</li><li>Recommendation: Netflix could diversify its portfolio by exploring underrepresented genres and ratings to attract a more diverse audience.</li></ul><h4>4. Seasonal Releases</h4><ul><li>Quantifiable Insight: There is a noticeable spike in the number of TV shows added during December and January, suggesting these are peak months for new releases.</li><li>Recommendation: Given this seasonal trend, Netflix could focus on releasing highly anticipated new seasons or exclusive content during these months to capitalize on increased viewership.</li></ul><pre># Filtering the dataset for TV Shows<br>tv_shows_data = netflix_data[netflix_data[&#39;type&#39;] == &#39;TV Show&#39;]<br><br># Extracting the month from the &#39;date_added&#39; column<br>tv_shows_data[&#39;date_added&#39;] = pd.to_datetime(tv_shows_data[&#39;date_added&#39;])<br>tv_shows_data[&#39;month_added&#39;] = tv_shows_data[&#39;date_added&#39;].dt.month<br><br># Counting the number of TV Shows added each month<br>monthly_additions = tv_shows_data[&#39;month_added&#39;].value_counts().sort_index()<br><br># Visualizing the data<br>plt.figure(figsize=(12, 6))<br>sns.barplot(x=monthly_additions.index, y=monthly_additions.values, palette=&#39;coolwarm&#39;)<br>plt.title(&#39;Number of TV Shows Added Each Month&#39;)<br>plt.xlabel(&#39;Month&#39;)<br>plt.ylabel(&#39;Number of TV Shows&#39;)<br>plt.xticks(ticks=range(0, 12), labels=[&#39;Jan&#39;, &#39;Feb&#39;, &#39;Mar&#39;, &#39;Apr&#39;, &#39;May&#39;, &#39;Jun&#39;, &#39;Jul&#39;, &#39;Aug&#39;, &#39;Sep&#39;, &#39;Oct&#39;, &#39;Nov&#39;, &#39;Dec&#39;])<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*-_h4XC2nT1DIg2ncRI6n3g.png" /></figure><p>Assuming that the date_added field accurately represents when new seasons of TV shows are added to Netflix, we can observe a trend in season releases. For example, let&#39;s say a higher percentage of new seasons are added in December and January compared to other months.</p><p>This could indicate that Netflix aims to capitalize on holiday free time and the new year period when viewers are more likely to engage with content. Launching new seasons during these months could potentially result in higher viewership and engagement rates.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e987bc6f150" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Steal Like an Artist?]]></title>
            <link>https://medium.com/@hiteshtaneja/how-to-steal-like-an-artist-8a8dc08a042b?source=rss-cc287853de8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a8dc08a042b</guid>
            <category><![CDATA[steal-like-an-artist]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[people]]></category>
            <category><![CDATA[austin-kleon]]></category>
            <dc:creator><![CDATA[Hitesh Taneja]]></dc:creator>
            <pubDate>Fri, 06 Oct 2023 10:33:25 GMT</pubDate>
            <atom:updated>2023-10-06T10:33:25.187Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0a3dPD018Ra3rT2dOGfdDw.jpeg" /></figure><p>Are you feeling uninspired? Do you think you don’t have enough original ideas to be creative? If so, you’re not alone. But there’s good news: creativity is not about coming up with completely new ideas. It’s about combining and transforming existing ideas to create something new.</p><p>Just before we get any further with my so-called motivational article I would like to share my experience and why I can relate so much to this book, Let me be honest, throughout my entire life I have stolen stuff like assignments and answers, cheated in an exam, stolen code from stack overflow (you can say this as asking for help). Even when I started my initial career journey I worked as a Tutor (this was before ChatGPT was introduced), and I used to help students with their assignments and class works and tests/quizzes on StudyPool, and guess what? especially in a computer science subject, I stole a lot of code. I mean you can call this getting help from the internet but for me, it is copying/stealing. I used to keep the foundation/logic of the code similar but then I used to add my creativity to it and make it unique and plagiarism-free. I am not dragging this further, assuming that you got the idea LOL. Then I came across this book, and obviously, I am not a reader, my friend suggested this book (<a href="https://amzn.to/3LRkybH">link</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s2w_m1L1A4qTadAhke8gXQ.jpeg" /></figure><p>That’s the message of Austin Kleon’s book Steal Like an Artist. In it, Kleon argues that all creative work is derivative and that the best way to be creative is to “steal” from the work of others.</p><p>Of course, Kleon doesn’t mean that we should plagiarize. He means that we should study and learn from the work of artists we admire, and then use that knowledge to create our own unique work.</p><p><strong><em>Here are a few tips that you can steal from “Steal Like An Artist”:</em></strong></p><ol><li><strong>Identify your influences</strong>. What artists/creators/role models inspire you? What kind of work do you admire? Make a list of your influences and start studying their work.</li><li><strong>Look for patterns</strong>. What are the common elements in the work of your influences? What are the techniques they use? What are the themes they explore? Detect the gap in their work if any.</li><li>Steal the thinking behind the style. Don’t just copy the style of your influences. Try to understand their way of thinking. What are they trying to achieve with their work?</li><li><strong>Remix and Reimagine</strong>. Once you have a good understanding of your influences, start remixing and reimagining their work. Combine different elements to create something new.</li><li><strong>Add your own unique voice</strong>. The most important thing is to add your own unique voice to your work. Don’t be afraid to experiment and try new things.</li></ol><p>Stealing like an artist is a great way to learn and grow as a creative person. It can help you to develop your own unique style and voice. So don’t be afraid to steal from the best.</p><p><strong><em>Here are a few motivational quotes which I underlined:</em></strong></p><blockquote>“Nothing is original. Steal from what you love.”<br>“Don’t wait until you know who you are to start making things.”<br>“Write the book you want to read.”<br>“Use your hands.” [try to use analog way of writing things down and then put them in digital form]<br>“Side projects and Hobbies are important.”</blockquote><p>I hope this article has inspired you to start stealing like an artist. Remember, there is no such thing as a completely original idea. The best creative work is derivative.</p><p>So don’t be afraid to borrow from the best and make it your own.</p><p><em>Stay Tuned for the article on the book “</em><strong><em>Show Your Work</em></strong><em> by Austin Kleon”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a8dc08a042b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EDA Techniques: Uncovering the Secrets of Data]]></title>
            <link>https://medium.com/@hiteshtaneja/eda-techniques-uncovering-the-secrets-of-data-e41b9a151e37?source=rss-cc287853de8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e41b9a151e37</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[techniques]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[eda]]></category>
            <dc:creator><![CDATA[Hitesh Taneja]]></dc:creator>
            <pubDate>Sat, 06 May 2023 19:43:22 GMT</pubDate>
            <atom:updated>2023-05-06T19:43:22.181Z</atom:updated>
            <content:encoded><![CDATA[<p>As a data scientist <em>[ </em><a href="https://www.linkedin.com/in/hitesh-taneja-0a3779188/"><em>good question am I one?</em></a><em> Lol]</em>, the first step in data analysis? The first step is to search for your data. Exploratory data analysis (EDA) is the process of understanding data through visualization<em> [ this word has inspired me to write this article ]</em>, content analysis, and other methods to identify patterns, inconsistencies, and relationships in the literature. EDA is an important step because it helps you understand your data, identify potential problems, and determine the best way to model the data.</p><p>In this article, I will talk about some EDA techniques you can use to better understand your data. I will try my best to explain this process using data containing information about different types of flowers <em>[ because I remember using this example in my last year of graduation ]</em>.</p><h3><strong>Histogram</strong></h3><p>It is a useful EDA technique that allows you to visualize the distribution of data. They indicate the number of occurrences of a particular value or range of values ​​in the data. Histograms are created by dividing the data into ranges (or “boxes”) and counting the number of values ​​that fall into each bin. For example, let’s say we have data containing the sizes of different types of flowers. We can construct a histogram to show the distribution of the length:</p><figure><img alt="Flower Length Histogram" src="https://cdn-images-1.medium.com/max/1024/1*6O9_90mGt9tYkLuOcyP3NA.png" /><figcaption>Flower Length Histogram</figcaption></figure><p>In this histogram we can see that the length of the flower varies from 4 cm to 8 cm, most of the flowers are about 5 cm in length. — 6 cm.<br>We can also see that there are no flowers longer than 8 cm, indicating a problem with our data.</p><h3>Scatterplot</h3><p>The scatterplot is another useful EDA technique that allows you to visualize the relationship between two variables in the data. They plot one variable on the x-axis and another variable on the y-axis, with each point on the graph representing an observation in the data. For example, suppose we have data containing the lengths and widths of different flower types in centimeters. We can create a scatterplot to see the relationship between the variables:</p><figure><img alt="Scatter plot of flower length and width" src="https://cdn-images-1.medium.com/max/1024/1*EIfNxvqUUdR4z1VdZ_l0Qg.png" /><figcaption>Scatter plot of flower length and width</figcaption></figure><p>In this scatter plot, we can see a relationship between flower length and width.<br>As the length of the flower increases, the width also increases. However, we can also see some outliers in data with a higher width than expected given the length. This may indicate a problem with our data or the need for further investigation.</p><h3>Boxplot</h3><p>Boxplot is a useful EDA technique that allows you to visualize the distribution of data and identify possible outliers. They show the median (median value), interquartile range (IQR) (median between the 25th and 75th percentiles), and data range.<br>For example, let’s say we have a file that contains a wide variety of flower types. We can create a boxplot to see the width distribution:</p><figure><img alt="Petal Width Boxplot" src="https://cdn-images-1.medium.com/max/1024/1*5O6Cp6_EQvt0kPeZYqjoTw.png" /><figcaption>Petal Width Boxplot</figcaption></figure><p>In this boxplot, we can see that the average width is about 1.5 cm and the IQR is about 0.75 cm and 2.1 cm. <br>5 cm indicates a potential outlier that may require further investigation.</p><p><strong>Conclusion</strong><br>Data Analysis (EDA) is an essential step in any data analysis project. By using EDA techniques such as histogram, scatterplot, and boxplot, we can better understand our data, identify potential problems, and prepare the data for modeling. While this article uses only a few EDA techniques, there are many more that you can use depending on your data and research questions. By taking the time to analyze our data, we can gain a better understanding and ensure we make informed decisions based on our data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e41b9a151e37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to write MOM or “Minutes of Meeting”?]]></title>
            <link>https://medium.com/@hiteshtaneja/how-to-write-mom-or-minutes-of-meeting-c83d04b31be7?source=rss-cc287853de8f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c83d04b31be7</guid>
            <dc:creator><![CDATA[Hitesh Taneja]]></dc:creator>
            <pubDate>Tue, 13 Dec 2022 17:03:12 GMT</pubDate>
            <atom:updated>2022-12-13T17:03:12.157Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AWaAzcQCGNxFAdd-" /></figure><p>Recently, I came to know about the word “MOM” or Minutes of Meeting, which eventually I wasn’t aware of.<br>A MOM, or minutes of the meeting, is a document that outlines the important points discussed during a meeting. It can be helpful for tracking progress on a project or initiative by providing a record of decisions made, action items assigned, and deadlines agreed upon.</p><p>Here is an example of a MOM that could be used to track progress on a project:</p><p><strong>Title:</strong> MOM for Project X</p><p><strong>Date:</strong> December 12, 2022</p><p><strong>Attendees:</strong></p><ul><li>John Doe</li><li>Jane Smith</li><li>Tom Anderson</li></ul><p><strong>Agenda:</strong></p><ol><li>Review of previous action items</li><li>Update on project progress</li><li>Discussion of next steps and challenges</li><li>Assignment of new action items</li></ol><p><strong>Meeting minutes:</strong></p><ol><li>The previous action items were reviewed and the following updates were provided:</li></ol><ul><li>John reported that he had completed his task of conducting research on potential partners for the project.</li><li>Jane reported that she had completed her task of creating a draft project proposal.</li><li>Tom reported that he had completed his task of setting up a meeting with the project stakeholders.</li></ul><ol><li>An update on the project’s progress was provided by Jane, who reported that the project proposal had been reviewed and approved by the stakeholders. She also provided an overview of the project timeline and milestones.</li><li>The group discussed the next steps for the project, including the need to secure funding and finalize the project plan. They also discussed some challenges that had been identified, including the need to coordinate with other teams and the potential for changes in project scope.</li><li>New action items were assigned as follows:</li></ol><ul><li>John: Follow up with potential partners to secure funding for the project.</li><li>Jane: Finalize the project plan and timeline.</li><li>Tom: Coordinate with other teams to ensure alignment and avoid duplication of effort.</li></ul><p><strong>Next meeting:</strong> December 19, 2022, at 10:00 am.</p><p><strong>Action items:</strong></p><ul><li>John: Follow up with potential partners to secure funding for the project.</li><li>Jane: Finalize the project plan and timeline.</li><li>Tom: Coordinate with other teams to ensure alignment and avoid duplication of effort.</li></ul><p>That’s how you can write MOM….lol 😂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c83d04b31be7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>