<?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 Andrew Parulian on Medium]]></title>
        <description><![CDATA[Stories by Andrew Parulian on Medium]]></description>
        <link>https://medium.com/@andrew.parulian1?source=rss-cf77f1579a7f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XDt6OLGSDtdAPJX7</url>
            <title>Stories by Andrew Parulian on Medium</title>
            <link>https://medium.com/@andrew.parulian1?source=rss-cf77f1579a7f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:55:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andrew.parulian1/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[Geospatial (Part 1): Mapping with Spatial Analytics]]></title>
            <link>https://medium.com/@andrew.parulian1/geospatial-part-1-mapping-with-spatial-analytics-124edd23be9e?source=rss-cf77f1579a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/124edd23be9e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[telecommunication]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[geospatial]]></category>
            <dc:creator><![CDATA[Andrew Parulian]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 01:50:17 GMT</pubDate>
            <atom:updated>2026-07-07T01:50:17.156Z</atom:updated>
            <content:encoded><![CDATA[<p>During my internship at Telkomsel, my mentor tasked me with developing a geospatial script to identify the most optimal spots for building new BTS towers in Jakarta. In this Medium article, I will walk you through my process for creating this project. I will split it into three main parts: Spatial Autocorrelation, Machine Learning, and Prescriptive Analysis: Site Suitability.</p><p><strong>Introduction: The CapEx Dilemma</strong> Let’s face it: the telecommunications industry in Indonesia is an absolute battlefield. If you look at how the major players operate, survival usually comes down to one thing — how smartly you spend your Capital Expenditure (CapEx).</p><p>Building just one new Base Transceiver Station (cell tower) costs billions of rupiah. Yet, surprisingly, deciding where to put that expensive new tower is often still based on gut feeling or basic population heatmaps.</p><p>But here’s the reality check: a crowded neighborhood doesn’t always mean a profitable one. If you build a tower in a hyper-dense area that a competitor already completely dominates (a classic “Red Ocean”), you’re just burning cash for a minimal Return on Investment (ROI).</p><p>This project was born out of that exact frustration. I wanted to answer a specific question: How can we use Geospatial Data Science to turn millions of messy data points into confident, mathematically-backed decisions for land acquisition?</p><ol><li><strong>The Data: Where Do We Even Start?</strong></li></ol><p>No analytical model is magic; it’s only as good as the data feeding it. To get a real picture of what’s happening on the ground, I pulled together a few open-source datasets:</p><p>· <a href="https://www.opencellid.org/"><strong>OpenCelliD</strong></a><strong> (The Raw Tower Data):</strong> I needed to know exactly where our towers and our competitors’ towers are. This massive open database gave me the raw GPS coordinates of active cell towers.</p><p>· <strong>OpenStreetMap (The Roads):</strong> You can’t build a tower in the middle of a lake or a neighborhood with no road access. I used the osmnx library in Python to pull primary road networks straight from satellite data.</p><p>· <a href="https://data.humdata.org/dataset/kontur-population-indonesia"><strong>Demographics &amp; Population</strong></a><strong>:</strong> Finally, I layered in district boundaries and population density to give every square meter of Jakarta some human context.</p><p><strong>2. The Foundation: Why I Ditched Geohash for Uber’s H3</strong></p><p>Before we can process anything, we need a map grid. A lot of tech folks default to Geohash (those square or rectangular grids you often see).</p><p>But here’s the catch: when you’re measuring radio signal coverage, squares are terrible. The distance from the center of a square to its flat side is completely different from the center to its corner. It distorts the signal radius.</p><p>My fix? I migrated the whole architecture to <strong>Uber’s H3 Hexagonal Grid</strong>. Hexagons are beautiful for this kind of work — the distance from the center to any side is exactly the same, making it the gold standard for spatial analysis without the weird geometric bias.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*VfDFli1evsk1NkciWYG-Ow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*mivFMC2g79KlkZioPCjcjA.png" /><figcaption>Geohash square grid vs. the Uber H3 hexagonal grid</figcaption></figure><p><strong>3. Taming the Wild Data</strong></p><p>Raw data is notoriously messy. You can’t just shove millions of OpenCelliD coordinates into a model and hope for the best. Here is the spatial preprocessing pipeline I built using pandas, geopandas, and h3:</p><p>· <strong>Cleaning House:</strong> I filtered the data specifically for Indonesia (using Mobile Country Code 510) and then separated our towers (Telkomsel) from the competitors using the Mobile Network Code (MNC). Anything with broken or missing GPS coordinates got tossed out.</p><p>· <strong>Spatial Indexing:</strong> Analyzing millions of individual points is a nightmare. Instead, I converted those points into H3 indices (resolution 9) using a quick lambda function in Python.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/986228c17aac80f52151a86bfb82f8ae/href">https://medium.com/media/986228c17aac80f52151a86bfb82f8ae/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDnGmJP1QDJ5vrX7_K0LYA.png" /></figure><p>· <strong>Finding the Target:</strong> Next, I grouped the data to count our towers vs. theirs in every single hexagon. I then filtered the dataset for pure <strong>Blank Spots</strong> — areas where people actually live (population &gt; 0), but we have zero towers. This is where the competition actually happens.</p><p><strong>4. Spatial Statistics: Before We Touch AI</strong></p><p>Before we even think about training predictive Machine Learning algorithms, we need to validate what we’re looking at using pure spatial statistics. We shouldn’t just color a map red just because there are a lot of people there. Instead, I relied on Tobler’s First Law of Geography: Things that are close to each other are more related than things that are far apart.</p><p>· <strong>Global Moran’s I:</strong> I used this to check if market dominance in Jakarta is just random luck, or if competitors are actually forming strategic, defensive clusters.</p><p>· <strong>Getis-Ord Gi* (Hotspot Analysis):</strong> Using Python’s esda library, I hunted down which of these competitive clusters were actually statistically significant.</p><p><strong>5. The Insight: Finding the Real Battlegrounds</strong></p><p>The Getis-Ord Gi* statistics didn’t just give me a pretty heatmap; they sliced the city into mathematically validated zones:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*yL5jrzQRIQu_To-SOCGUVw.png" /><figcaption>Hotspot Analysis Map</figcaption></figure><ul><li><strong>The Red Zones (Hotspots):</strong> These are our stronghold areas characterized by the highest density of our own BTS towers. These are critical defense zones.</li><li><strong>The Blue Zones (Coldspots):</strong> These are territories heavily saturated with competitor BTS towers.</li></ul><p><strong>Wrapping Up Part 1</strong> By combining solid data engineering with spatial statistics, we stopped guessing. We successfully turned millions of chaotic data points into an objective, strategic map of the market.</p><p>But here’s the lingering question for our CapEx budget: Out of all those critical red zones, which specific grid promises the absolute best ROI if we build a tower there tomorrow?</p><p>In <strong>Part 2</strong>, we’ll move from just looking at the past to predicting the future. I’ll walk you through Spatial Feature Engineering and how I trained a Machine Learning model (CatBoost) to pinpoint the most profitable locations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=124edd23be9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Part 2] Uncovering Churn Signals: Analyzing Telecom Customer Behavior and the Importance of Early…]]></title>
            <link>https://medium.com/@andrew.parulian1/part-2-uncovering-churn-signals-analyzing-telecom-customer-behavior-and-the-importance-of-early-453967b28462?source=rss-cf77f1579a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/453967b28462</guid>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[business-strategy]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Andrew Parulian]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 04:17:11 GMT</pubDate>
            <atom:updated>2026-04-21T04:17:11.222Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>[Part 2] Uncovering Churn Signals: Analyzing Telecom Customer Behavior and the Importance of Early Detection</strong></h3><p>Customer retention is far more cost-effective than acquisition. Fortunately, customers rarely leave abruptly; they leave a digital trail of behavioral changes. Utilizing a 70,000-user dataset from the <a href="https://www.kaggle.com/competitions/telecom-churn-case-study-hackathon-gc1/overview"><strong>Kaggle Telecom Churn Case Study Hackathon</strong></a>, I set out to build a Predictive Early Warning System to identify high-risk customers before they unsubscribe.</p><p>If you’ve read my previous article, <a href="https://medium.com/@andrew.parulian1/from-usage-drops-to-retention-building-an-early-warning-churn-system-with-catboost-f2e7b239fafe"><strong>From Usage Drops to Retention: Building an Early Warning Churn System with CatBoost</strong></a><strong> </strong>and <a href="https://medium.com/@andrew.parulian1/part-1-building-an-interactive-dashboard-a-technical-guide-to-visualizing-telecom-customer-churn-e1b31575e2c0"><strong>[Part 1] Building an Interactive Dashboard: A Technical Guide to Visualizing Telecom Customer Churn</strong></a>, you already know how we visualized the data in PowerBI and turned these metrics into a robust machine learning model.</p><p>But before the algorithm can work its magic, we must first understand the story the data is telling us. Through interactive Power BI visualizations, we can clearly see how monthly usage, recharge values, and subscription duration (Age on Network) serve as strong predictors.</p><p>Here are the key findings from our Exploratory Data Analysis (EDA) that reveal the anatomy of at-risk customers.</p><h3><strong>1. The Macro View: High Value vs. Standard Users</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*67hctpBV7VkhOt_8Or3zGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*QGmr37MP2Rqw1x4E0aWJ6Q.png" /></figure><p>Out of the 70,000 total customers with an Average Revenue of around $840, the overall churn rate stands at <strong>10.19%</strong>. If we dissect this group based on customer value segmentation, an interesting dynamic emerges:</p><ul><li><strong>Standard</strong> customers have a higher churn rate of <strong>11.12%</strong>.</li><li><strong>High Value</strong> customers demonstrate strong retention, with a churn rate of only <strong>6.46%</strong>.</li></ul><p>Although the churn percentage among High Value customers is smaller, losing them has a significantly more massive impact on the company’s ARPU (Average Revenue Per User). Therefore, understanding the specific churn indicators within the High Value segment is a top business priority.</p><h3>2. Loyalty Grows Over Time (Age on Network)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*hKaAkm1GFTNZBn9I-OGN4A.png" /></figure><p>Does the duration of a customer’s subscription guarantee their loyalty? The data indicates a very strong positive correlation.</p><p>Based on the Age on Network (AON) analysis, the majority of loyal customers both in the High Value and Standard segments are dominated by those who have been subscribed for more than 3 years (making up about 42% — 45% of the total loyal group). Conversely, within the churned customer group, the proportion of customers with a tenure of less than 2 year is highly significant. This indicates that the first year is the most critical phase for building customer engagement.</p><h3><strong>3. Warning Signals: Plummeting Usage and Recharge Trends</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*-Sk72OfWbQ5x8v6PlClp-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*cCWlQpZHIB-lS7kER10UNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*sAa-Qko9KnbPJ__erFO6JA.png" /></figure><p>The heart of churn prediction lies in short-term time-series analysis, specifically looking at the 6th, 7th, and 8th months. Here, the dashboard reveals a striking divergence between the loyal and churn groups:</p><ul><li><strong>Data &amp; Voice Usage:</strong> For Loyal customers, data and voice usage tends to be stable or even increases from month 6 to 8. However, for Churn customers, there is a sudden, drastic drop in the 8th month.</li><li><strong>Recharge Value:</strong> The same pattern is repeated in the recharge amounts. Customers who eventually churn show a sharp downward trend in their recharge value in the final month before they leave, indicating they have already begun detaching from the network provider’s services.</li></ul><h3><strong>4. The “Zero Usage” Phenomenon: The Critical Point Before Departure</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*uMq3dMv3bS4Q9Gq--333Jg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*t4bfWIa6Uj2ORF3n5qhcmg.png" /></figure><p>In the telecommunications industry, silence is the loudest warning sign. One of the most glaring findings in this Exploratory Data Analysis lies in the network inactivity metrics, specifically the “Zero Usage” phenomenon. When we isolate the churned segments, the numbers reveal a stark reality about how different types of customers abandon the network.</p><p>The Death of Data Consumption In today’s digital age, mobile data is the primary driver of telecom revenue. Looking at the Zero Data Usage chart, the figures are staggering:</p><p>· 93.90% of Standard-Churn customers recorded absolutely zero data usage.</p><p>· 84.85% of High Value-Churn customers also hit zero data usage.</p><p>When over 84% of your most profitable customers suddenly stop consuming their data packages, it is no longer just an early warning it is a “red alarm” indicating that the customer has likely already purchased a competitor’s SIM card for their internet needs.</p><p>The Voice Usage Plot Twist However, a fascinating nuance appears when we look at the Zero Call Usage chart. While Standard-Churn customers tend to abandon voice calls entirely (with 65.41% showing zero call usage), the High Value-Churn segment tells a different story. In this premium group, only 38.72% show zero call usage.</p><p>This means that a significant majority (61.28%) of churning High Value customers are <em>still</em> making calls on the network, even though they have completely stopped using data.</p><p>The Business Insight What does this behavioral mismatch tell us? It suggests that High Value customers don’t just throw their SIM cards away immediately. Because they likely use their phone numbers for business contacts, banking OTPs, or family connections, they keep the SIM active for traditional voice calls, but they have shifted their primary data consumption to a competitor with better network quality or pricing.</p><p>For the business and marketing teams, this is a golden window of opportunity. Because these High Value customers are still connected to the voice network, they are still reachable. Instead of generic promotions, the marketing team can deploy highly targeted, heavily discounted data “win-back” packages to this specific segment before they decide to port their number out completely.</p><h3><strong>From Visual Understanding to Machine Learning Prediction</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*v3lGYSzIVu7o-z12W7z97w.png" /></figure><p>The EDA dashboard above clearly confirms one thing: <strong>Customers don’t just churn instantly; their usage gradually drops first.</strong> The decline in data usage, voice usage, and recharge value are the primary key influencers that precede the final churn decision.</p><p>However, retrospectively understanding these insights from a dashboard is not enough. To secure market share and prevent revenue leakage, telecom companies must be able to detect these usage drops automatically and predict them before the 8th month ends.</p><p>This is where Machine Learning takes over. Starting from these historical patterns, we can build a classification model to serve as an early warning system.</p><p>If you are interested in seeing how these “usage drop” metrics are engineered into powerful predictive features, and how the machine learning implementation is done using the CatBoost algorithm, please read the technical continuation in my previous article:</p><p><a href="https://medium.com/@andrew.parulian1/from-usage-drops-to-retention-building-an-early-warning-churn-system-with-catboost-f2e7b239fafe"><strong>From Usage Drops to Retention: Building an Early Warning Churn System with CatBoost</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=453967b28462" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Part 1] Building an Interactive Dashboard: A Technical Guide to Visualizing Telecom Customer Churn]]></title>
            <link>https://medium.com/@andrew.parulian1/part-1-building-an-interactive-dashboard-a-technical-guide-to-visualizing-telecom-customer-churn-e1b31575e2c0?source=rss-cf77f1579a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1b31575e2c0</guid>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[visualization]]></category>
            <dc:creator><![CDATA[Andrew Parulian]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 10:42:25 GMT</pubDate>
            <atom:updated>2026-04-21T04:17:31.963Z</atom:updated>
            <content:encoded><![CDATA[<p>In the highly competitive telecommunications industry, customer retention is often far more crucial and cost-effective than acquiring new customers. However, customers rarely leave abruptly; they leave a digital trail of behavioral changes.</p><p>In this project, I set out to change the narrative from reactive to proactive. Utilizing a rich dataset containing 70,000 user records from the <a href="https://www.kaggle.com/competitions/telecom-churn-case-study-hackathon-gc1"><strong>Kaggle Telecom Churn Case Study Hackathon</strong></a>, I aimed to build a Predictive Early Warning System capable of detecting signals of customers leaving a full month in advance.</p><p>Before jumping into the AI modeling, I designed a Power BI dashboard to dissect their behavioral patterns. Here is the step-by-step technical process of how I built it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*RJo2wb7yKP_-pNU_-rTfrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*rkVnFsUILQ7KWafC9fHQ_A.png" /></figure><h3><strong>Step 1: Data Cleaning with Python Scripts</strong></h3><p>Telecom datasets often have hundreds of columns with a massive amount of missing values (nulls). In the context of telecom data — such as recharge amounts, call durations, or data volume — a missing value typically indicates that no activity occurred during that specific period.</p><p>Therefore, filling these gaps with 0 is not just a technical fix, but a logical business assumption. To handle this efficiently across hundreds of columns without clicking them one by one, I performed mass imputation using a simple Python script directly inside Power Query.</p><ul><li><strong>Execution:</strong> In the <em>Transform</em> menu, I selected <em>Run Python Script</em>.</li><li><strong>Code:</strong> I wrote a concise script to automatically replace any missing values across the entire dataset with 0, assuming no usage or activity.</li></ul><h3><strong>Step 2: Feature Engineering &amp; Business Logic (The Core Analysis)</strong></h3><p>Raw data alone is rarely enough to predict churn. This is the most crucial part where I created new metrics based on telecom business logic to extract deeper insights:</p><h4><strong>1. Identifying High Value Customers (HVC)</strong></h4><p>In the telecom industry, we often apply the 80/20 rule (Pareto principle). I wanted to isolate the customers who provide the most significant financial impact.</p><ul><li><strong>Logic:</strong> First, I summed up the ARPU (Average Revenue Per User) from months 6, 7, and 8.</li><li><strong>Methodology:</strong> I used DAX functions to check if a customer’s total revenue fell into the <strong>Top 20% percentile</strong>. If they did, they were labeled as <strong>“High Value”</strong>; otherwise, they were tagged as <strong>“Standard”</strong>.</li></ul><h4><strong>2. Calculating “Usage Drop” (The Decline Signal)</strong></h4><p>Customers rarely churn out of nowhere; there is usually a downward trend in their usage.</p><ul><li><strong>Logic:</strong> I compared the activity in month 8 (the last month before potential churn) with month 7.</li><li><strong>Formula:</strong> Usage_Drop = [Usage_Month_8] — [Usage_Month_7]. A large negative difference serves as a primary indicator that a customer is starting to detach from our services.</li></ul><h4><strong>3. Detecting “Zero Usage” (The Final Red Flag)</strong></h4><p>This is the ultimate warning sign. I wanted to see who was still registered as a customer but hadn’t used the services at all in month 8.</p><ul><li><strong>Zero Data Usage:</strong> I created logic to check the data usage column in month 8. If the value was 0, they were labeled as <strong>“Zero Data Usage”</strong>; if greater than zero, they were <strong>“Active”</strong>.</li><li><strong>Zero Call Usage:</strong> Using the exact same logic on the call duration column for month 8. If a customer recorded 0 minutes, they were labeled <strong>“Zero Call Usage”</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*QwDGBRtuPY1I3kDCbnp8AA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*5QtWGnEzMDzAQN5d2RIVoA.png" /><figcaption>Example of the code for the Table</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*STamzo9lgUrUmiVR64X6dw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*ywFs6Sc2EOMQTie4aLK05g.png" /><figcaption>All the New Columns created with DAX</figcaption></figure><h3><strong>Step 3: Visualization and AI Insights</strong></h3><p>Once the metrics were ready, I arranged the visualizations to highlight behavioral contrasts:</p><ol><li><strong>KPI Cards:</strong> Displaying <em>Total Revenue</em>, <em>Churn Rate</em>, and total customers for a quick executive overview.</li><li><strong>100% Stacked Bar Chart:</strong> Showing the proportion of <strong>“Zero Usage”</strong> vs. <strong>“Active”</strong> customers. This chart effectively illustrates that the vast majority of churned customers had actually stopped using data entirely by month 8.</li><li><strong>Key Influencers (AI Visual):</strong> I utilized Power BI’s built-in AI visual to automatically analyze what factors most influence the <em>High Value</em> segment to remain <em>Loyal</em>. The results showed that revenue stability (<em>Revenue Drop</em>) is the key driver.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*VY6MFD18tldqdZvRmQUwFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*z7jip5RJjseR3Kp_rTijsA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/1*dcoBhq-3ENxwY_nwtO0jtw.png" /></figure><p>With this dashboard, we have successfully visualized the “digital footprints” customers leave behind before they exit. But what do these numbers actually mean for business strategy? And how can we turn these findings into automated predictions?</p><p>Let’s dissect the full business insights and EDA findings in the next article: <a href="https://medium.com/@andrew.parulian1/part-2-uncovering-churn-signals-analyzing-telecom-customer-behavior-and-the-importance-of-early-453967b28462"><strong>[Part 2] Uncovering Churn Signals: Analyzing Telecom Customer Behavior and the Importance of Early Detection</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1b31575e2c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Usage Drops to Retention: Building an Early Warning Churn System with CatBoost]]></title>
            <link>https://medium.com/@andrew.parulian1/from-usage-drops-to-retention-building-an-early-warning-churn-system-with-catboost-f2e7b239fafe?source=rss-cf77f1579a7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2e7b239fafe</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[shap]]></category>
            <category><![CDATA[telkomsel]]></category>
            <category><![CDATA[catboost]]></category>
            <dc:creator><![CDATA[Andrew Parulian]]></dc:creator>
            <pubDate>Thu, 02 Apr 2026 03:25:04 GMT</pubDate>
            <atom:updated>2026-04-02T05:01:20.490Z</atom:updated>
            <content:encoded><![CDATA[<p>Before we dive into the data, a quick introduction: I am currently a university student at BINUS, completing my internship at Telkomsel. Working closely within the telecommunications environment sparked my curiosity about how massive amounts of user data can be transformed into actionable business strategies. To deepen my knowledge in telco data analytics, I decided to tackle one of the industry’s biggest headaches: customer churn.</p><p>In the hyper-competitive telecommunications industry, keeping an existing customer is just as critical and up to five times cheaper than acquiring a new one. When a customer decides to switch to a competitor, it’s rarely a sudden decision; it is usually preceded by a trail of subtle behavioral changes.</p><p>However, there is a fundamental flaw in how many businesses approach this: most churn models are reactive. They detect that a customer is leaving when it is already too late to win them back.</p><p>In this project, I set out to change that narrative. Utilizing the rich dataset from the<strong> </strong><a href="https://www.kaggle.com/competitions/telecom-churn-case-study-hackathon-gc1"><strong>Kaggle Telecom Churn Case Study Hackathon</strong></a>, I built a Predictive Early Warning System designed to identify high-risk customers a full month in advance, giving the marketing team the crucial lead time needed to intervene.</p><p>Here is a deep dive into how I approached the data, engineered the features, and built the predictive model.</p><h3><strong>Exploratory Data Analysis</strong></h3><p>Before throwing algorithms at the problem, I needed to understand the behavioral patterns of our customers. I focused on answering two questions: <em>When</em> do the warning signs appear, and <em>who</em> is most likely to leave?</p><h4><strong>Imbalanced Datasets</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*AjPsp7C7G0GfPP70jP6ycQ.png" /></figure><p>Like most real-world churn datasets, ours was highly imbalanced. Only <strong>10.2%</strong> of the customers in the dataset churned. This “Critical Minority” meant that standard evaluation metrics like Accuracy would be misleading, and our future model would need a strategy to handle this imbalance.</p><h4>The “Freefall” Phenomenon</h4><p>I tracked vital metrics across a 3-month observation window (Month 6, Month 7, and Month 8). By looking at the Average Revenue Per User (ARPU) and Minutes of Usage (MOU), a clear pattern emerged:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*zeGPrxnn03tnKXu_qBba7g.png" /></figure><p>Customers do not leave abruptly. Instead, their activity goes into a complete freefall in the month prior to churning (Month 7). Revenue and usage from churners plummeted drastically compared to retained customers. This mathematically proved that an Early Warning System was possible: if we detect the drop in Month 7, we can predict the churn in Month 8.</p><h4><strong>The Loyalty Gap</strong></h4><p>Are long-time users just as likely to leave as newcomers? To answer this, I looked at the Age on Network (AON) distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*dHA8JSIqdGlOi6qUVf4Tlg.png" /></figure><p>The data showed that churning customers were heavily concentrated in the low-tenure segment (under 2 years). Conversely, retained customers had a significantly wider and more stable distribution. This validated a core business principle: switching costs and loyalty naturally increase over time.</p><h3><strong>Feature Engineering</strong></h3><p>To build a reliable predictive model, the raw data needed to be carefully curated and transformed. Machine Learning models are only as smart as the data you feed them, and the most critical step here was ensuring the model didn’t “cheat.”</p><p>The process of preparing this dataset involved three critical steps combined into a single, robust function:</p><ol><li>Anti-Leakage Strategy: The biggest pitfall in predictive modelling is Data Leakage accidentally including information from the future to predict the future. Since our goal is to build an Early Warning System (predicting Month 8 churn using only data from Month 6 and Month 7), it was mandatory to remove every single feature related to Month 8 (August). If we left even one Month 8 variable, the model would achieve 99% accuracy in training but fail in real-world deployment. I also removed non-predictive features like IDs and dates.</li><li>Handling the Missing Pieces: Telecom data is notoriously messy. A blank value (Nan) in a “total recharge amount” column doesn’t necessarily mean the data is lost; logically, it means the customer simply didn’t top up their balance that month. Therefore, I imputed these missing values with 0 (or -1 for categorical flags) to reflect inactivity, rather than using statistical means which would distort reality.</li><li>Feature Engineering: Static data is often uninformative. If a customer makes 100 minutes of calls in Month 7, that tells us little. But if they made 500 minutes in Month 6, that 100 minutes represents a massive drop. To help the AI understand these behavioral shifts, I translated human behavior into mathematical trends by engineering “Difference” features (subtracting Month 6 from Month 7).</li></ol><p>Here is the comprehensive function I built to execute this entire pipeline:</p><pre>def preprocess_telecom_data_early_warning(train, is_train=True):<br>    &quot;&quot;&quot;<br>    Function to process telecom churn data using ONLY month 6 &amp; 7 <br>    (Early Warning System).<br>    &quot;&quot;&quot;<br>    data = train.copy()<br>    cols_to_drop = [&#39;id&#39;, &#39;circle_id&#39;]<br>    <br>    # --- 1. Data Leakage Handling ---<br>    # Drop all columns related to month 8<br>    cols_bulan_8 = [c for c in data.columns if c.endswith(&#39;_8&#39;) or &#39;aug&#39; in c.lower()]<br>    cols_to_drop.extend(cols_bulan_8)<br>    <br>    # Drop date columns<br>    date_cols = [c for c in data.columns if &#39;date&#39; in c]<br>    cols_to_drop.extend(date_cols)<br>    <br>    # Drop columns that have only 1 unique value (zero variance)<br>    single_value_cols = [c for c in data.columns if data[c].nunique() &lt;= 1]<br>    cols_to_drop.extend(single_value_cols)<br>    <br>    cols_to_drop = list(set(cols_to_drop).intersection(data.columns))<br>    data = data.drop(columns=cols_to_drop)<br>    <br>    # --- 2. Missing Value Handling ---<br>    # 1. Data and Internet Package Columns (Fill NaN with 0)<br>    data_recharge_cols = [<br>        &#39;total_rech_data_6&#39;, &#39;total_rech_data_7&#39;,<br>        &#39;max_rech_data_6&#39;, &#39;max_rech_data_7&#39;,<br>        &#39;count_rech_2g_6&#39;, &#39;count_rech_2g_7&#39;,<br>        &#39;count_rech_3g_6&#39;, &#39;count_rech_3g_7&#39;,<br>        &#39;av_rech_amt_data_6&#39;, &#39;av_rech_amt_data_7&#39;,<br>        &#39;arpu_3g_6&#39;, &#39;arpu_3g_7&#39;,<br>        &#39;arpu_2g_6&#39;, &#39;arpu_2g_7&#39;<br>    ]<br>    for col in data_recharge_cols:<br>        if col in data.columns:<br>            data[col] = data[col].fillna(0)<br>            <br>    # 2. Flag / Categorical Columns (Fill NaN with -1)<br>    cat_cols = [<br>        &#39;night_pck_user_6&#39;, &#39;night_pck_user_7&#39;,<br>        &#39;fb_user_6&#39;, &#39;fb_user_7&#39;<br>    ]<br>    for col in cat_cols:<br>        if col in data.columns:<br>            data[col] = data[col].fillna(-1).astype(int)<br>            <br>    # 3. Other Numeric Features <br>    numeric_cols = data.select_dtypes(include=[&#39;float64&#39;, &#39;int64&#39;]).columns<br>    if &#39;churn_probability&#39; in numeric_cols:<br>        numeric_cols = numeric_cols.drop(&#39;churn_probability&#39;)<br>        <br>    data[numeric_cols] = data[numeric_cols].fillna(0)<br>    <br>    # --- 3. Feature Engineering (Month 7 vs Month 6 Trends) ---<br>    # 1. ARPU (Billing) Trend<br>    if &#39;arpu_6&#39; in data.columns and &#39;arpu_7&#39; in data.columns:<br>        data[&#39;diff_arpu_7_vs_6&#39;] = data[&#39;arpu_7&#39;] - data[&#39;arpu_6&#39;]<br>        <br>    # 2. Total Voice Usage (MOU) and its Trend<br>    for m in [&#39;6&#39;, &#39;7&#39;]:<br>        if f&#39;onnet_mou_{m}&#39; in data.columns and f&#39;offnet_mou_{m}&#39; in data.columns:<br>            data[f&#39;total_mou_{m}&#39;] = data[f&#39;onnet_mou_{m}&#39;] + data[f&#39;offnet_mou_{m}&#39;]<br>            <br>    if &#39;total_mou_6&#39; in data.columns and &#39;total_mou_7&#39; in data.columns:<br>        data[&#39;diff_mou_7_vs_6&#39;] = data[&#39;total_mou_7&#39;] - data[&#39;total_mou_6&#39;]<br>        <br>    # 3. Recharge Amount Trend<br>    if &#39;total_rech_amt_6&#39; in data.columns and &#39;total_rech_amt_7&#39; in data.columns:<br>        data[&#39;diff_rech_amt_7_vs_6&#39;] = data[&#39;total_rech_amt_7&#39;] - data[&#39;total_rech_amt_6&#39;]<br><br>    # 4. Data Recharge Trend<br>    if &#39;total_rech_data_6&#39; in data.columns and &#39;total_rech_data_7&#39; in data.columns:<br>        data[&#39;diff_rech_data_7_vs_6&#39;] = data[&#39;total_rech_data_7&#39;] - data[&#39;total_rech_data_6&#39;]<br><br>    return data<br><br>train_clean = preprocess_telecom_data_early_warning(train, is_train=True)<br>test_clean = preprocess_telecom_data_early_warning(test, is_train=False)<br><br>X = train_clean.drop(columns=[&#39;churn_probability&#39;])<br>y = train_clean[&#39;churn_probability&#39;]<br>X_test = test_clean <br><br>categorical_features_names = [<br>    &#39;night_pck_user_6&#39;, &#39;night_pck_user_7&#39;,<br>    &#39;fb_user_6&#39;, &#39;fb_user_7&#39;<br>]<br>cat_features = [col for col in categorical_features_names if col in X.columns]</pre><p>By completing these steps and running the function, the dataset was transformed from a messy collection of numbers into a sharp, trend-focused foundation ready for our predictive algorithm.</p><h3><strong>Modelling with CatBoost</strong></h3><p>After meticulously cleaning the data and engineering trend features, we finally have a dataset ready for Machine Learning. However, a model is only proven useful if it can perform on data it has never seen before. To ensure our model wasn’t just memorizing the past (overfitting), I split the dataset, reserving 30% of the customers as a completely hidden test set. This acts as our final exam for the AI.</p><pre>X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.3, random_state=42, stratify=y)<br>print(f&quot;Distribusi Target Data Validasi:\n{y_val.value_counts(normalize=True)}&quot;)</pre><h4><strong>Why CatBoost?</strong></h4><p>For this tabular dataset, I utilized the CatBoost Classifier. I chose this specific algorithm for two strategic reasons:</p><ol><li>Native Categorical Handling: Telecom data is full of categorical flags (e.g., “Is this a night package user?”). CatBoost processes these seamlessly without needing complex One-Hot Encoding.</li><li>The Class Imbalance Cure: Remember that only 10.2% of our customers churned. If an algorithm always guesses “Retained,” it will be 89.8% accurate but entirely useless. CatBoost has a brilliant parameter called auto_class_weights=’Balanced’, which forces the AI to pay extreme attention to the minority churn class.</li></ol><pre>cb_model = CatBoostClassifier(<br>    iterations=1000,<br>    learning_rate=0.05,<br>    depth=3,<br>    eval_metric=&#39;AUC&#39;,<br>    custom_metric=[&#39;AUC&#39;],<br>    auto_class_weights=&#39;Balanced&#39;, <br>    cat_features=cat_features,<br>    l2_leaf_reg=10,<br>    random_seed=42,<br>    early_stopping_rounds=100, <br>    verbose=100 <br>)<br><br>cb_model.fit(<br>    X_train, y_train,<br>    eval_set=[(X_train, y_train), (X_val, y_val)],<br>    use_best_model=True<br>)</pre><h3><strong>Evaluating the Model</strong></h3><p>When evaluating a churn model in the telecom industry, you have to align your metrics with business reality.</p><p>If the model makes a False Positive (guessing a loyal customer will churn), the company wastes a few dollars giving them a free promo. But if the model makes a False Negative (failing to predict a churner), the company loses hundreds of dollars in future revenue.</p><p>Therefore, I optimized the model for a High-Recall Strategy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*6PapGCsedi-cCiINfIlHog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*3VpatcK1IA51nJ0F0Dmnpw.png" /></figure><h4><strong>Translating AI Metrics into Business Reality</strong></h4><p>Looking at the numbers in the Confusion Matrix and performance metrics might feel a bit too technical, so let’s translate what they actually mean for the business. Based on the test data, this model successfully identified 1,505 customers who were genuinely about to leave (True Positives). On the flip side, 635 customers slipped through the cracks and ultimately churned (Leakage / False Negatives), while 3,858 loyal customers were incorrectly flagged as high-risk (False Positives).</p><p>At first glance, the model’s Precision score might seem low (28.1%) due to the large volume of “false alarms” targeting loyal customers. However, this is exactly where domain knowledge in the telecommunications (Telco) industry is crucial. In the Telco business, the retention cost to secure a customer — such as offering a free data quota or a subscription discount to a False Positive customer — is significantly cheaper than the Customer Acquisition Cost (CAC) required to acquire a brand-new customer to replace the one we actually lost (False Negative).</p><p>Because of this, the model was strategically optimized to prioritize a high Recall (70.3%). This means we intentionally cast a wider net in our early warning system to successfully capture over 70% of the flight-risk customers. We happily traded off a bit of precision to minimize fatal customer leakage.</p><p>Overall, the reliability of this AI architecture is validated by its AUC score of 0.83. This score proves that the CatBoost algorithm is highly capable (performing well above a 0.5 random guess baseline) of distinguishing the true danger signals of churning customers from loyal customers who are merely experiencing a temporary dip in their usage.</p><h4><strong>Decoding the AI Logic with Shap</strong></h4><p>In the corporate world, a highly accurate “Black Box” model is a nightmare for business stakeholders. If you tell a Marketing Director, <em>“The AI predicts User A will churn next month,”</em> their immediate and justified response will be, <em>“Why?”</em> They cannot design a targeted marketing campaign based on a blind guess.</p><p>To bridge the gap between Machine Learning and Business Strategy, I used SHAP. SHAP is a game-theoretic approach that breaks down individual predictions, showing us exactly which features pushed the AI toward Churn or Retained.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*FXmmLUJsi0lJ5LrXM-iaYQ.png" /></figure><p>Looking at the SHAP summary plot, the AI mathematically confirmed the exact hypotheses we built during our initial Exploratory Data Analysis (EDA):</p><ul><li><strong>The Loyalty Anchor (aon):</strong> Look at the top feature, aon (Age on Network). The red dots (representing high values, or long tenure) strongly push the model&#39;s prediction to the left (Retained). Conversely, the blue dots (short tenure) push it heavily to the right (Churn). The model agrees: short-term tenure is the absolute strongest predictor of flight risk.</li><li><strong>The “Freefall” Signal (</strong><strong>diff_arpu_7_vs_6 &amp; Usage Metrics):</strong> Look at our engineered trend features. Decoding the Dots: For these metrics, Blue Dots represent low or negative values (drastic drops in revenue and usage in Month 7), which strongly push the model to the right to predict CHURN. Conversely, Red Dots represent high values (stable or increasing usage), which keep the prediction safely on the left as LOYAL. Our strategy to capture behavioral momentum worked perfectly. The AI learned that when a customer&#39;s usage suddenly plummets, they already have one foot out the door.</li></ul><h3><strong>Conclusion</strong></h3><p>A Data Scientist’s job does not end when the model hits an 83% ROC-AUC score; it ends when the model drives actual business value. AI is not just for prediction; it is an engine for strategic action. Based on this Early Warning System, telecom companies can immediately implement two data-driven strategies:</p><p>· <strong>Automated Proactive Campaigns</strong>: Stop being reactive. Do not wait until Month 8 when the customer has already decided to leave. Set up automated system triggers to send personalized retention promos (e.g., heavily discounted data packages) the moment a customer’s Month 7 usage (diff_arpu_7_vs_6) falls significantly below their historical average.</p><p>· <strong>Protect the Vulnerable</strong>: Retention budgets are limited. Instead of spraying promos to everyone, allocate the highest budget toward new customers (low aon), as the AI unequivocally proves they are the most susceptible to competitor offers.</p><p>By shifting from a reactive mindset to a proactive, AI-driven Early Warning System, businesses can intercept churn before the customer even says goodbye.</p><p><a href="https://github.com/andrewparulian1/Telecom-Churn-Case-Study/tree/main">Github of the code</a></p><h3>References</h3><p><strong>Gallo, A. (2014).</strong> <em>The Value of Keeping the Right Customers</em>. Harvard Business Review.</p><p><strong>Reichheld, F. F. (2001).</strong> <em>Prescription for Cutting Costs</em>. Bain &amp; Company.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2e7b239fafe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>