<?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 Chandrakanth Nimmaluri on Medium]]></title>
        <description><![CDATA[Stories by Chandrakanth Nimmaluri on Medium]]></description>
        <link>https://medium.com/@urstrulychandu?source=rss-41e3f93f4436------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HP6Uz1V7eWX2qAUB</url>
            <title>Stories by Chandrakanth Nimmaluri on Medium</title>
            <link>https://medium.com/@urstrulychandu?source=rss-41e3f93f4436------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 21:29:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@urstrulychandu/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[Customer Segmentation Model]]></title>
            <link>https://urstrulychandu.medium.com/customer-segmentation-model-905de45593b6?source=rss-41e3f93f4436------2</link>
            <guid isPermaLink="false">https://medium.com/p/905de45593b6</guid>
            <category><![CDATA[k-means]]></category>
            <category><![CDATA[customer-segmentation]]></category>
            <category><![CDATA[clustering]]></category>
            <category><![CDATA[telecom]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Chandrakanth Nimmaluri]]></dc:creator>
            <pubDate>Sat, 15 May 2021 13:45:11 GMT</pubDate>
            <atom:updated>2021-05-16T13:40:48.533Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>INTRODUCTION</strong></blockquote><p>In today’s world, telecom domain has an impulsive behaviour because of the rapidly changing customer needs and usage patterns. Change in customer preferences implies a need for change in Business strategy.</p><p>Therefore Customer segmentation is of utmost priority to enhance the sales, evolve new business plans and marketing strategies, designing promotions for target audience thereby enhancing revenue and allow the organization to lead the board among other active business rivals. Hence having the capability to distinguish between different categories of customers is the need of the hour.</p><p>Many literatures have reviewed the application of data mining technology in customer segmentation, and achieved sound effectives. But in most cases, it is performed using customer data from a single system, rather than from systematic method considering all verticals i.e., most telecommunications carriers cluster their customers with the use of billing system data alone and the accuracy levels of the resulting segmentation is not upto the mark.</p><blockquote><strong>PROOF OF CONCEPT</strong></blockquote><p>The proposed idea in this article is a Proof of concept where in Customer segmentation will be performed by considering multiple systems like EAI, Credit Control, Billing, Siebel CRM, Mediation, Loyalty, etc which depicts multiple dimensions of the customer data and helps in segmentation.</p><p>We take into account customer revenue and usage in the previous months, customer demographics, customer loyalty points, vanity, credit limit, dunning cycle, active promotions, addons and formulate relevant features which have least correlation factor.</p><blockquote><strong>DATA CLEANING &amp; ML MODEL</strong></blockquote><p>We use sampling techniques to choose the customer base for initial development of the model.</p><p>EDA(Exploratory Data Analysis) will be carried out on the sample data.</p><p>Outliers &amp; Multicollinearity checks shall be done on the feature set.</p><p>We use <strong><em>K-Means Clustering algorithm(Unsupervised).</em></strong></p><blockquote><strong>MODEL OBJECTIVE</strong></blockquote><p>The scope of this article depicts a model that shall be developed as a technology demonstration where sampled data(1000 samples in this article) consisting of voice, prepaid, data and postpaid customers are picked and fed to the model for segmentation.</p><p>The same can be extended to the entire data set and a full fledged Customer segmentation model could be developed.</p><p>This model helps to have an accurate customer segmentation than what is being followed by most of the telecom companies at present.</p><p>Apart from performing clustering, this model picks the upcoming customers after a minimal active period and places them in the already defined segments thereby enabling business to offer relevant promotions to these clusters right from the initial period of customer life cycle.</p><blockquote><strong>Now let us dive into the coding part</strong></blockquote><p><em>importing all the required libraries..</em></p><pre>import numpy as np<br>import pandas as pd<br>from sklearn.cluster import KMeans<br>%matplotlib inline<br>import matplotlib.pyplot as plt<br>from sklearn.decomposition import PCA<br>from sklearn.metrics import silhouette_score, adjusted_rand_score<br>from sklearn.preprocessing import LabelEncoder, MinMaxScaler, StandardScaler</pre><p>The input data set looks something like this. Here, we considered 238 features from the raw data set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*gvpVV0H5DIwo4dnHXt5ILA.png" /></figure><h3>Correlation Matrix</h3><pre>test.corr(method=&#39;pearson&#39;,min_periods=2)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DOcrVN1B-ddrXJfIkTXrfA.png" /></figure><h3>There is no definitive answer for finding right number of clusters as it depends upon (a) Distribution shape (b) scale in the data set © clustering resolution required by user.</h3><p>We are considering 6 clusters in kMeans method of Unsupervised learning.</p><pre>km=KMeans(n_clusters=6,random_state=None,init=&#39;k-means++&#39;,max_iter=300)</pre><h3>Filling Missing values with Mean</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*ePFAZlzi0ZaXFnqg5hMeZQ.png" /></figure><h3>Standardization</h3><p>We use Standard scaling for bringing all the data onto one common scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*6Mcy0aGAmcjzBTRAXDyVYw.png" /></figure><pre>out=km.fit_predict(scaled_features)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*yNAmR80JUl_EFeWszIVPng.png" /></figure><p>The output above shows numbers from 0 to 5 which allots each customer to different clusters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*JwF6VwKRRGOWJgl9rMxozw.png" /></figure><h3>Dimensionality Reduction — Principle Component Analysis</h3><pre>pca=PCA()<br>data=pca.fit_transform(scaled_features)<br>scaled_features</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*9F6zJyraDMtAzZZjtSgOWg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*JZ0ztvWav-OI6WAkboZXGg.png" /></figure><pre>explained_variance=pca.explained_variance_ratio_<br>plt.scatter(range(1,197),explained_variance)<br>plt.plot(range(1,197),explained_variance)<br>plt.title(&#39;screeplot&#39;)<br>plt.grid()<br>plt.show</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*tI3_hHGlMUZvi5deS1PWOw.png" /></figure><h3>Elbow Method:</h3><pre>sse=[]<br>for i in np.arange(1,21):<br>    km2=KMeans(n_clusters=i,random_state=None,init=&#39;k-means++&#39;,max_iter=300)<br>    km2.fit_predict(sc)<br>    sse.append(km2.inertia_)</pre><pre>plt.scatter(range(1,21),sse)<br>plt.plot(range(1,21),sse)<br>plt.title(&#39;ELBOW PLOT&#39;)<br>plt.xticks(np.arange(1,21,step=2))<br>plt.xlabel(&quot;No. of clusters&quot;)<br>plt.ylabel(&quot;SSE&quot;)<br>plt.grid()<br>plt.show</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*mZYfnRn6k08FlIPj6xYghg.png" /></figure><p>Finally we add up a new column to our original data set to show the cluster numbers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2awb7vo8CwYmgamCJWcTdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*OzTb1SFtdoJzSMvVWW6atg.png" /></figure><p>This shows that cluster 3 has 463 customers, 1 has 225 customers and so on. This way customer segmentation can be performed in any domain taking all the verticals and thereby making it a hybrid segmentation model not just depending on one parameter.</p><blockquote><strong><em>Please comment below for any clarifications/suggestions. Thankyou.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=905de45593b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IPL 2020 winner prediction]]></title>
            <link>https://urstrulychandu.medium.com/ipl-2020-winner-prediction-a960adc2b92c?source=rss-41e3f93f4436------2</link>
            <guid isPermaLink="false">https://medium.com/p/a960adc2b92c</guid>
            <category><![CDATA[ipl-prediction]]></category>
            <category><![CDATA[winner]]></category>
            <category><![CDATA[ml-model]]></category>
            <category><![CDATA[ipl2020]]></category>
            <category><![CDATA[logistic-regression]]></category>
            <dc:creator><![CDATA[Chandrakanth Nimmaluri]]></dc:creator>
            <pubDate>Sun, 27 Dec 2020 13:58:44 GMT</pubDate>
            <atom:updated>2022-07-13T06:05:35.754Z</atom:updated>
            <content:encoded><![CDATA[<p>IPL 2020 has begun in UAE this time with 8 teams and Dubai, Sharjah and Abu Dhabi as hosting stadiums all three being home grounds for all the teams. Prediction of an IPL match depends on various factors and no less than Rocket science involving many parameters.</p><figure><img alt="IPL 2020 Champions" src="https://cdn-images-1.medium.com/max/326/1*A7svDZ_4n2O4zHnHE-fNfg.png" /></figure><p>We used <strong><em>Logistic Regression </em></strong>to the predict winner of every match including play offs and the Final. The features used were Home team, Away team, Ground, Win percentage from 2008 to 2019, toss winner in each match.</p><blockquote>Now its time to go through the coding part of our Machine Learning model.</blockquote><p>Initially, we shall import all the required libraries needed for our algorithm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*9LCb1b6X7DTX2wKO_ji0GA.png" /><figcaption>imports</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0_r8NgNmZfPf0dSyHezv4A.png" /><figcaption>filtering teams</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dxUwt2ZW4hSHS5K6zoUa_g.png" /><figcaption>Winner prediction</figcaption></figure><p>After data cleaning, our teams stats looks something like this(2 tables one below the other). Here, the figures against each team shows the number of matches played by the same as Home Team in the 1st table and as Away Team in the second table. so for example, CSK played 93 matches in Home grounds and 78 matches as Away Team(not Home ground) since 2008 till 2019 season.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*rVO5Dkh1HLZ3Ba9pNRs3Og.png" /><figcaption>Number of matches played</figcaption></figure><p>Then we find out the win percentage of each team against all the opponent teams since the inception of IPL by considering the historical data.</p><p>Then we have to encode the teams to numerical values in order to make the data compatible to Logistic Regression.</p><p>We use One-Hot Encoding Technique to do this. If you are new to this technique, please visit my post which gives a detailed explanation on <strong><em>One-Hot Encoding</em></strong><em>(click here).</em></p><blockquote><strong>final=pd.get_dummies(df,prefix=[‘Home Team’,’Away Team’],columns=[‘Home Team’,’Away Team’])</strong></blockquote><blockquote><strong>display(final)</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4FtRxldgEPHSQTU5jcOaBg.png" /></figure><p>After this, getting the number of matches won by each team in a seperate column ‘Result’ gets us the below numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*Nj6y6fLGBxFRZ4JTrYChkQ.png" /></figure><p>We perform Logistic Regression by calling the fit method after splitting the data into training and testing sets. We get an accuracy of around 50%(not bad).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*_Zob0wATay11h7lvhekqXw.png" /><figcaption>Logistic Regression</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*AIjogi9q6GeRxsm-6g5QQA.png" /></figure><p>The full code is posted in github repository.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a960adc2b92c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>