<?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 Bitaazari on Medium]]></title>
        <description><![CDATA[Stories by Bitaazari on Medium]]></description>
        <link>https://medium.com/@bitaazari71?source=rss-86172a7c6298------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wGqjse_O57SyvxOAtXGsrA.jpeg</url>
            <title>Stories by Bitaazari on Medium</title>
            <link>https://medium.com/@bitaazari71?source=rss-86172a7c6298------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 16:18:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bitaazari71/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[Marketing Analysis]]></title>
            <link>https://medium.com/@bitaazari71/marketing-analysis-2db1a5f67027?source=rss-86172a7c6298------2</link>
            <guid isPermaLink="false">https://medium.com/p/2db1a5f67027</guid>
            <category><![CDATA[marketing-automation]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[kpi]]></category>
            <category><![CDATA[marketing-analysis]]></category>
            <category><![CDATA[marketing]]></category>
            <dc:creator><![CDATA[Bitaazari]]></dc:creator>
            <pubDate>Tue, 05 Jul 2022 12:51:04 GMT</pubDate>
            <atom:updated>2022-07-05T12:51:04.998Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, my friends! In this article, I&#39;m going to talk about marketing analysis, and we will walk through the day-to-day of a Marketing Analyst. Campaign analysis, privacy implications, audience segmentation, sentiment analysis, and ROI modeling are all areas we’ll learn after reading this article. you can find <em>fundamental concepts</em> that help marketers achieve their goals.</p><p>you don&#39;t need to be professional and have a background in marketing to understand these topics. I made it simple and short for you. then let’s start..</p><p>marketing analysis should answer the following question:</p><ul><li>Who are my potential customers?</li><li>What are my customers’ buying habits?</li><li>How large is my target market?</li><li>How much are customers willing to pay for my product?</li><li>Who are my main competitors?</li><li>What are my competitors’ strengths and weaknesses?</li></ul><p>so now we need to know what is marketing analysis and how can we answer these questions!</p><p>Marketing Analysis: is an assessment of a market within a specific industry. with this analysis, market analysts will study the dynamics of your market, such as volume and value, <a href="https://medium.com/@bitaazari71/crm-analytics-customer-segmentation-with-rfm-customer-lifetime-value-part-1-d1773c7c5cd9">potential customer segments</a>, buying patterns, competition, and other important factors.</p><p>campaign marketing: Campaigns are organized efforts to achieve a specific marketing goal. For example, Apple has launched prominent campaigns when releasing new products like the iPod and iPhone. Because campaigns target a specific message or goal, they tend to run for a finite time period. campaigns should always support your brand strategy and messages, you can use AI for market research and market intelligence that can help you better understand how to shape your campaign and make it more creative.</p><p>key concepts and steps:</p><ol><li>the quantity of your goal of running a campaign: For example, if you’re trying to generate 100 new customers, figure out how many leads you’ll need and when you’ll need them. also, think about how you’ll use different media.</li><li>generate campaign ideas and strategies</li><li>targeting your audience</li><li>engage your audience and be creative in delivering the message, don&#39;t forget <strong>call-to-action</strong></li><li>plan your fulfillment</li><li>plan to measure: When you measure your campaigns, it’s easier to gain budget approval the next time around. You’ll also know exactly which programs produce the highest return. Identify how you’ll capture the data you need — unique phone numbers, unique URLs, etc.</li><li>continually test and improve: Even on a small campaign, you can evaluate your ad, your copy, your list, or other factors before you spend your entire budget. Keep the testing cycle going and track your results over time. You’ll improve your response rates and your return on investment.</li></ol><p>A common way of evaluating campaign performance is to benchmark against prior campaigns with similar goals. For example, comparing this year’s holiday campaign to last year’s holiday campaign.</p><h3><strong>Marketing Channels</strong></h3><p>Channels are methods of delivering messages to customers to drive campaign goals. Channels are often on distinct platforms from each other, like radio versus billboards. Some channels are offline (meaning not digital), like brick-and-mortar retail stores or TV.</p><p>Many channels are online (meaning on digital surfaces), like social media on Twitter, Instagram, Linkedin, or paid search on Google. Increasingly, channels serve ads on multiple platforms at the same time, and marketers select one surface over another as a tactic.</p><h3><strong>MARKETING LEVER CONCEPTS</strong></h3><h3><strong>Marketing Tactics</strong></h3><p>Tactics are the specific actions we employ within channels to achieve a strategy. Take TV as an example; marketers can choose the tactic of running TV ads on streaming platforms or on cable.</p><p>Other tactics apply to multiple channels, like re-targeting, where users are shown more relevant advertising based on their behavior like youtube ads.</p><h3><strong>Marketing Lever Hierarchy</strong></h3><p>While there are always exceptions to the rule, marketing levers are typically hierarchical. It is important to understand this as a Marketing Analyst because similar structures are observed in data models. A marketing program includes all marketing efforts and is the broadest lever. By comparison, individual ads are very granular. The three levers we just mentioned above also follow a hierarchy, in which campaigns contain channels, and channels contain tactics. This should be leveraged in deep-dive analysis; if we see a concerning trend at the campaign level, we can investigate channels within that campaign, and tactics within that channel.</p><p>so far we learned marketing lever concepts, now, let us bring it all together to review some common business questions a Marketing Analyst would encounter.</p><p>Revenue impact</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*q0a19EHrVe-o5i31xoiiKw.jpeg" /><figcaption>revenue impact</figcaption></figure><p>“ Did our campaign influence revenue?”</p><p>Ideally, people want the ability to compare tactics and channels by cost-effectiveness and revenue potential. Even if a campaign is not purposely driving revenue, marketers will want to know the revenue impact.</p><p>trends and troubleshooting</p><p>“Are we on track to beat our targets for customer acquisition?”</p><p>Another key theme is monitoring trends, where people want to understand “is this trend normal?” and “if it is not normal, what happened?”As Marketing Analysts, it is our job to determine which trends are concerning and merit deep-dive analysis.</p><p>“if we increase spending on paid search, how many more customers will we get?”</p><p>“can we still hit our targets with lower spend?”</p><p>these questions can lead marketers to cut some channel spending which they didn’t get the expected result.</p><p>KPI: KEY PERFORMANCE INDICATORS</p><p>KPI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*7SimHOUtKnqxuDDOg4lg8g.png" /></figure><p>A large part of answering marketing business questions is selecting appropriate measures of success. These are commonly called Key Performance Indicators (or KPIs). These are metrics that show if marketing efforts impact the overall business.</p><p>Usually, we select one or two metrics to understand business impact, and ideally, growth.KPIs vary based on the campaign goal and should tie to business health. in the next article, we will go into detail on these calculations. For now, we will cover themes of KPIs that turn up in business questions.</p><p>Product, operations, and finance partners want to know how marketing plays a part in overall business health. Those teams ask about KPIs like Return on Investment, or ROI, Lifetime Value, or LTV, (which is the revenue generated over their time as a customer), and overall customer retention and acquisition. Marketing partners, however, want to know about cost (per acquisition, click, and more) and how many people became customers out of those who engaged with marketing (like conversion or engagement rates).</p><p>KPI Theme:</p><p>KPIs like Return on Investment, or ROI, Lifetime Value, or LTV, (which is the revenue generated over their time as a customer), and overall customer retention and acquisition. Marketing partners, however, want to know about cost (per acquisition, click, and more) and how many people became customers out of those who engaged with marketing (like conversion or engagement rates).</p><p>this article was an introduction to marketing analysis, in the next article, I will write about PII, Advertising tracking, cookie implication, text analysis, paid search keywords, paid search analysis, and cross-channel text analysis.</p><blockquote>MORE TO COME…</blockquote><p>RESOURCES:</p><p>Data camp</p><p><a href="https://www.ionos.com/startupguide/grow-your-business">https://www.ionos.com/startupguide/grow-your-business</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2db1a5f67027" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customer Segmentation in Python- Cohort Analysis]]></title>
            <link>https://medium.com/@bitaazari71/customer-segmentation-in-python-cohort-analysis-75ec026a7de?source=rss-86172a7c6298------2</link>
            <guid isPermaLink="false">https://medium.com/p/75ec026a7de</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[marketing-strategies]]></category>
            <category><![CDATA[cohort-analysis]]></category>
            <dc:creator><![CDATA[Bitaazari]]></dc:creator>
            <pubDate>Sat, 09 Apr 2022 22:06:10 GMT</pubDate>
            <atom:updated>2022-04-09T22:06:10.687Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we’ll learn about Customer Segmentation. I broke down the topic to make it understandable and practical for you.</p><p>We all know that today, the most successful companies are the ones that know their customers so well that they can anticipate their needs. Data analysts play a key role in unlocking these in-depth insights and segmenting the customers to better serve them. First, we need to do a Cohort analysis to understand customer trends, then we will go for customer segmentation.</p><p>in order to understand the following statements and codes, you need to have a basic knowledge of pandas library,DateTime objects, and matplotlib or seaborn also basic knowledge of k-means clustering.</p><p>here we go!</p><p>Cohort analysis is a descriptive analytics tool, which groups and clustering customers into mutually exclusive cohorts — which are then measured over time.</p><p>Since “Cohort” is always time-bonded and represent a group of people/customer who attended your store/website during a certain time period.</p><p>For instance, cohort could be defined as all customers who paid for a service with credit cards in a certain month of the year like April. Cohorts can also be defined by other aspects like their size, the specific metrics being explored, and even the type of cohort being examined.</p><p><strong>There is 3 type of cohorts:</strong></p><ul><li>Time cohort (group customer by time)</li><li>behavior cohorts (groups customers by the type of product or service)</li></ul><p>Therefore based on the company strategies, they decide to group customers by time or behavior.</p><p>let’s start with a time cohort example, in this type they segment customers into acquisition cohorts<em> based on the month they made their first purchase. rows represent an index(number of periods) and columns indicate months. In order to understand our table better, we can create a cohort analysis heatmap.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*lNx5MBEISTE_EBJ8eBxcow.png" /></figure><p>For example, this number means that 37% of the cohort which signed up in August 2017, were active 5 months later. Column one here is the month of first purchase, therefore the retention rate is 100%. This means as customers had to be active this month on to be assigned to this cohort.</p><p>In order to understand better how this theory works in real business, we are going to use ‘online retail data’.</p><ul><li>** Check my previous story about this data set and RFM**</li><li>Download the datset <a href="https://archive.ics.uci.edu/ml/datasets/Online+Retail+II">here</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*eouiAN1NjcjyiuiFNwPhCg.png" /></figure><p>First, we start by checking the top 5 rows of data. The data contains 7 columns with the customer transactions. The main ones we will use are date, price, and customerID. Now that we have loaded the data, let’s build a simple cohort table for time-based cohorts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_reE0cX1hJVS9pDkoHv1bg.jpeg" /><figcaption>df.head()</figcaption></figure><p>Now, we create a function that truncates a given date object to <em>the first day of the month</em>. Then we apply it to the <em>InvoiceDate</em> and create an <em>InvoiceMonth</em> column. Then, we create a groupby() object with CustomerID, and use the InvoiceMonth column for further manipulation. and at the end, we use transform() together with a min() function to assign the smallest InvoiceMonth value to each customer. Finally, we have assigned the acquisition month cohort to each customer. We have added two columns — InvoiceMonth and CohortMonth.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/308c83b99fd7f3b5c95386d3e171be7c/href">https://medium.com/media/308c83b99fd7f3b5c95386d3e171be7c/href</a></iframe><p>We have added two columns — InvoiceMonth and CohortMonth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v19b5HKp7KbwQV7WJEok7A.jpeg" /></figure><p>HOW TO EXTRACT INTEGER VALUES FROM DATA?</p><p>First of all, we need to extract the year, month, and day. In order to calculate, the number of months between any transaction and the first transaction for each customer, we will use the InvoiceMonth and CohortMonth values.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac32108af93439e3f2dbcac4e2c85349/href">https://medium.com/media/ac32108af93439e3f2dbcac4e2c85349/href</a></iframe><p>Now we want to find the number of active customers as below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7bf70b529fa66b01d2ba0809bedcc0ae/href">https://medium.com/media/7bf70b529fa66b01d2ba0809bedcc0ae/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*Nirr96Y0gacx10uGrLDf4Q.jpeg" /><figcaption>monthly acquisition cohorts</figcaption></figure><p>Here in columns, in this pivot table, we have the first day of each month and the number of customers.</p><p>Until now we have assigned the cohorts and calculated the monthly offset for the metrics. It is time to calculate customer retention through our table. The retention measures how many customers from each of the cohorts have returned in the subsequent months.</p><p>First step: select the first column which is the total number of customers in the cohort.</p><p>Second step: calculate the ratio of how many of these customers came back in the subsequent months which is the retention rate.</p><p>to this first we store the first col of the table as total_cohort then we divide all values in cohort_counts table by total_cohort and name it retention, finally to make a percentage of it we multiply 100. so we have a customer retention rate metric, which is a very useful metric to understand how many of all the customers are still active.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4df184736c05db458e99114ddf6955ed/href">https://medium.com/media/4df184736c05db458e99114ddf6955ed/href</a></iframe><h3>Calculate average price</h3><p>In order to understand any differences in shopping patterns across time and across cohorts we have to calculate the average price.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/41ca2ac0d8afbee4f3e4b3fdfcc528b0/href">https://medium.com/media/41ca2ac0d8afbee4f3e4b3fdfcc528b0/href</a></iframe><h3>Cohort analysis visualization</h3><p>Now it is time to visualize what we have done, the most effective way to visualize and analyze cohort analysis data is through a heatmap with only a few lines of code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c59724f768d305234ea44478cd329cff/href">https://medium.com/media/c59724f768d305234ea44478cd329cff/href</a></iframe><p>Shortly, we found which customers are active, and now we understand cohort analysis is a better way of looking at data. Its application is not limited to a single industry or function. For example, e-commerce companies can use cohort analysis to spot products that have more potential for sales growth.In Digital marketing, it can help identify web pages that perform well based on time spent on websites, conversions, or sign-ups. In product marketing, this analysis can be used to identify the success of feature adoption rate and also to reduce churn rate (I will talk about it soon! ).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZNy1x5atkf3GKFg0gysqA.gif" /></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —Resources:</p><p>course: Customer Segmentation in Python by Karolis Urbonas — Datacamp</p><p>website:<a href="https://www.moengage.com/">https://www.moengage.com</a></p><p>book: Cohort Analysis, Volume 5 By Norval D. Glenn</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75ec026a7de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRM Analytics — Part2 CLTV Prediction with BGNBD&GG Model]]></title>
            <link>https://medium.com/@bitaazari71/crm-analytics-part2-cltv-prediction-with-bgnbd-gg-model-5e49820ee15c?source=rss-86172a7c6298------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e49820ee15c</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[customer-experience]]></category>
            <dc:creator><![CDATA[Bitaazari]]></dc:creator>
            <pubDate>Tue, 08 Mar 2022 09:31:24 GMT</pubDate>
            <atom:updated>2022-03-08T09:31:24.399Z</atom:updated>
            <content:encoded><![CDATA[<h3>CRM Analytics — Part2 CLTV Prediction with BGNBD&amp;GG Model</h3><p>Hello everyone,</p><p>In this part, I&#39;m going to write about customer lifetime value, and then we will learn how can we predict customer lifetime value. first of all, I want to begin with the definition and important role of CLTV in business.</p><p>Customer lifetime value is the total worth to a business of a customer over the whole period of their relationship. It’s an important metric as it costs less to keep existing customers than it does to acquire new ones, so increasing the value of your existing customers is a great way to drive growth.</p><h3>Customer lifetime value formula</h3><p><em>Customer revenue per year * Duration of the relationship in years — Total costs of acquiring and serving the customer = CLV</em></p><p>CLTV= Expected Number of Transaction * Expected Average Profit</p><p>as we can see, two factors that help us to predict customer lifetime value is the number of transaction and average profit.</p><p>Along with the <a href="https://medium.com/@bitaazari71/crm-analytics-customer-segmentation-with-rfm-customer-lifetime-value-part-1-d1773c7c5cd9">RFM model</a>, CLV is one of the most widely used models in marketing science today. Both are extremely useful for customer segmentation and a range of other e-commerce data science projects.</p><p>CLV can be used to help you focus your attention on retaining the most important customers (and acquiring others like them), and it can help you forecast what you’ll get from your customers if you can retain them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hrkhT7HayIrtM0fUHLlLlA.jpeg" /></figure><h3>BG/NBD AND GGModel</h3><p>since this article is related to <a href="https://medium.com/@bitaazari71/crm-analytics-customer-segmentation-with-rfm-customer-lifetime-value-part-1-d1773c7c5cd9">RFM analysis</a>, I will only explain BGNBD AND GGModel. here we go,</p><p>after reading our data and calculating RFM scores and analysis it&#39;s time to predict CLTV with BG/NBD model and GG submodel.</p><p>BG/NBD MODEL:</p><p>This model is based on the original Pareto/NBD model for CLV which was formulated by Schmittlein, Morrison, and Colombo in 1987. This version, which was written by Fader, Hardy, and Lee in 2005, is designed to be just as effective as Pareto/NBD but much easier to implement. It’s become one of the most widely used CLV models around. We can fit the model using the frequency, recency, and T data and then view a summary.</p><h4>This model contains transaction process and dropout process:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sVuHr7A0H-qKbtaHFXT0vw.png" /><figcaption>BG/NBD Model</figcaption></figure><p>Each parameter represents as below:</p><p>E(Y(t)|X) : Conditional expected number of transaction for customer X.<br>x: Number of repeated sales, for users who have traded at least a second time, for users who have not yet churn<br>tx: time from customer’s first purchase to last purchase (recency value)<br>T: time elapsed since the customer’s first purchase (customer’s age)</p><h3>Gamma Gamma Submodel:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ERgwQVrKQDl34Oq0STzTSA.png" /><figcaption>GG Submodel</figcaption></figure><p>Each parameter represents as below:</p><p>x: number of repeat sales-frequency<br>mx: observed transaction value<br>M: expected transaction value</p><p>business solution</p><p>we are going to Make a 6-month CLTV prediction for 2010–2011 UK customers from our Part-1 dataset.</p><p>first of all, for 2010–2011 UK customers, we divide all customers into 4 groups (segments) according to 6-month CLTV and add the group names to the dataset.</p><ol><li>check the threshold</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/06214cd7b0f1e9457ef59d64b1e8cfd8/href">https://medium.com/media/06214cd7b0f1e9457ef59d64b1e8cfd8/href</a></iframe><p>2. Recalculate the up limit and low limit as per thresholds for Quantity and Price</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f96ab6352994ebbf7cce0350c45d7fa/href">https://medium.com/media/7f96ab6352994ebbf7cce0350c45d7fa/href</a></iframe><p>3. Calculate cltv_df with group-by and aggregation functions</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a875d924acc94cee715ce5ce1545ba3f/href">https://medium.com/media/a875d924acc94cee715ce5ce1545ba3f/href</a></iframe><p>4. Change the name of columns and re-calculate the monetary</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ca5c460aa058b151b1bebf282b4c4f28/href">https://medium.com/media/ca5c460aa058b151b1bebf282b4c4f28/href</a></iframe><p>5. Monetary should be bigger than 0</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/368de00cbeaa705060027a2c089d439b/href">https://medium.com/media/368de00cbeaa705060027a2c089d439b/href</a></iframe><p>6. Change the recency and T on a weekly basis. This was a daily basis.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ec3988a9febf14d711fa25dbb442062/href">https://medium.com/media/4ec3988a9febf14d711fa25dbb442062/href</a></iframe><p>7. Determine the frequency as bigger than 1</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d1e584bf9425e3ffde003475ff5af63/href">https://medium.com/media/6d1e584bf9425e3ffde003475ff5af63/href</a></iframe><p>8. Use the below models to block the overfitting</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/77833ac8dc604a7a28fbe20a8dd95450/href">https://medium.com/media/77833ac8dc604a7a28fbe20a8dd95450/href</a></iframe><p>9. Calculate expected average profit</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6fdaf40289a053973a55c7ba674f7b7/href">https://medium.com/media/b6fdaf40289a053973a55c7ba674f7b7/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*AvFbm9mF9hnlU0UY5AgajA.jpeg" /></figure><p>10. Calculate customer lifetime values for months</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7626cb9121b7c709f88701b52edb8d65/href">https://medium.com/media/7626cb9121b7c709f88701b52edb8d65/href</a></iframe><p>11. Merge Customer IDs with clv</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1551d74a16226d01974882f02a3870d/href">https://medium.com/media/b1551d74a16226d01974882f02a3870d/href</a></iframe><p>Separate the segments as A, B, C, D</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/88e6ac0825fcd2e9940f745e344377f2/href">https://medium.com/media/88e6ac0825fcd2e9940f745e344377f2/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1IbOxEAKLuo3ETFH1io3DA.jpeg" /></figure><p>while we are looking at Table CLV, there are 52 weeks between customer 18102’s first purchase and last purchase. The time elapsed from the customer’s first purchase to date is again approximately 52 weeks. The 6-month expected value for this customer will bring to the company is 3595,1928. The customer is the company’s most valuable customer and has a 6-month customer lifetime value of 85648,4974.</p><p>Thanks for reading my article, I hope you enjoy it</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e49820ee15c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRM Analytics(customer segmentation with RFM, customer lifetime value )-part 1]]></title>
            <link>https://medium.com/@bitaazari71/crm-analytics-customer-segmentation-with-rfm-customer-lifetime-value-part-1-d1773c7c5cd9?source=rss-86172a7c6298------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1773c7c5cd9</guid>
            <category><![CDATA[rfm-analysis]]></category>
            <category><![CDATA[crm]]></category>
            <category><![CDATA[rfm]]></category>
            <dc:creator><![CDATA[Bitaazari]]></dc:creator>
            <pubDate>Thu, 10 Feb 2022 20:16:37 GMT</pubDate>
            <atom:updated>2022-02-17T18:15:25.436Z</atom:updated>
            <content:encoded><![CDATA[<p>hello everyone!</p><p>In this article, I’m going to talk about CRM-RFM analytics with python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Pl8KNCz8-Nj4L1_YlDIGg.jpeg" /></figure><p>First of all, CRM is defined as customer relationship management and <strong>helps businesses to gain an insight into the behavior of their customers and modify their business operations</strong> to ensure that customers are served in the best possible way.</p><p>how CRM analytics can use in business?</p><p>CRM analytics gives us <strong>insights into our customers and how well our sales and customer service teams are reaching them</strong>. It also helps us monitor our customer service efforts, validate our customer data, analyze our customers’ habits and generate better leads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BIdTl8xoaykM7GKNW8hrzw.jpeg" /></figure><p>let’s start with RFM and customer segmentation, then I’ll show you how to code on python. RFM is a technique for customer behavior segmentation. Based on customers’ historical transactions, RFM analysis focuses on 3 main aspects of customers’ transactions: recency, frequency, and purchase amount. Understanding these behaviors will allow businesses to cluster different customers into groups. and as a result of this, they can consider marketing strategies for each group.</p><p><strong>BUSINESS PROBLEM :</strong></p><p>An e-commerce company wants to segment its customers and determine marketing strategies according to these segments. For this, we will define the behavior of customers and create groups according to the clusters in these behaviors. In other words, we will take those who show common behaviors into the same groups and we will try to develop sales and marketing-specific techniques for them.</p><p><strong>Dataset:</strong></p><p>The Online Retail II data set include all the transactions for a UK-based and registered, non-store online retail between 01/12/2009 and 09/12/2011. The company mainly sells unique all-occasion gift-ware. The vast majority of customers are corporate customers.</p><p><strong>Dataset variables :</strong></p><ul><li>InvoiceNo: Invoice number. Nominal. A 6-digit integral number is uniquely assigned to each transaction. If this code starts with the letter ‘c’, it indicates a cancellation.</li><li>StockCode: Product (item) code. Nominal. A 5-digit integral number is uniquely assigned to each distinct product.</li><li>Description: Product (item) name. Nominal.</li><li>Quantity: The quantities of each product (item) per transaction. Numeric.</li><li>InvoiceDate: Invoice date and time. Numeric. The day and time when a transaction was generated.</li><li>UnitPrice: Unit price. Numeric. Product price per unit in sterling (Â£).</li><li>CustomerID: Customer number. Nominal. A 5-digit integral number is uniquely assigned to each customer.</li><li>Country: Country name. Nominal. The name of the country where a customer resides.</li></ul><p>Data preparation and after that, we can extract some information about the data set and see descriptive statistics, nunique, check missing values for description and stock code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/37eeb39355c2bf8b644298eda092cf5f/href">https://medium.com/media/37eeb39355c2bf8b644298eda092cf5f/href</a></iframe><figure><img alt="data understanding : df.head()" src="https://cdn-images-1.medium.com/max/1014/1*XcDzJmvnNOyQb-t1YHUVHQ.jpeg" /><figcaption>df.head()</figcaption></figure><p>RFM SCORE :</p><p>after that we should calculate the RFM score :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee2a652dec392a19ae41784a34a60909/href">https://medium.com/media/ee2a652dec392a19ae41784a34a60909/href</a></iframe><p>for recency 1 is a good score and it presents close time while for frequency and monetary 5 is a good score.</p><p>as I mentioned before RFM represents a segmentation strategy that helps us analyze and split customers into segments based on three variables: Recency, Frequency, and Monetary Value. Specialists initially use it in database marketing and direct marketing, but lately, RFM analysis has received significant attention and is widely used in eCommerce.That’s why the main benefit of an RFM Analysis consists of addressing each segment separately, according to what you know about them based on their score on Recency, Frequency, and Monetary value indicators.</p><p>result of the above codes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*tblfw_tvrm9793XHnTmNfw.jpeg" /></figure><p>to have a better analysis, we create a seg_map dictionary and figure which is based on Recency and Frequency(RFM SCORE)to realize:</p><ul><li>How many times the event has occurred</li><li>The last time a user performed the event</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/032439d4b7cf59e13b896d51fcf40411/href">https://medium.com/media/032439d4b7cf59e13b896d51fcf40411/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*MYZZiZeUgoyM9PAWYvgvgw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0IEFp9SgGr980HcEVuBoYA.png" /></figure><p>As it can be seen from the graph the majority of our customers are in hibernating segmentation and after that, we have loyal customers. We have a lot of customers who don’t buy frequently from us (hibernating). However, less than 50% of our customers are either champions or loyal customers. so when we determine which customers belong to which segmentation, it becomes easy to consider and apply marketing strategies efficiently.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f23c8d01f8f69d2d51408d92f863e95f/href">https://medium.com/media/f23c8d01f8f69d2d51408d92f863e95f/href</a></iframe><p>“Can’t Lose”, “Hibernating” and “Champions” are the most important segments. we can explain these 3 segments as below :</p><p>Can’t lose:</p><p>in this segment, customers have not recently made a purchase. to encourage them, the company can offer discounts and manage a gift campaign. these are crucial since in their last purchase they made a large number of purchases. also, the reason why they stop buying should investigate.</p><p>Hibernating Segment:</p><p>In this segment, customers have not purchased for a long time. we can offer some discount or introduce new products to them.</p><p>Champions Segment:</p><p>These are the most important and valuable segments for the company. then, we can send them samples of new products or make them happy with special gifts. write down in the comment your marketing strategies for each segment.</p><p>Thank you for reading. In part-2 I will explain CLTV Prediction with the BGNBD&amp;GG model.</p><p>Resources :</p><ul><li><a href="https://searchdatamanagement.techtarget.com/definition/RFM-analysis#:~:text=RFM%20analysis%20is%20a%20marketing,and%20perform%20targeted%20marketing%20campaigns.&amp;text=RFM%20analysis%20ranks%20each%20customer,Recency">https://searchdatamanagement.techtarget.com/</a></li><li><a href="https://www.veribilimiokulu.com/rfm-analizi-ile-musteri-segmentasyonu/">https://www.veribilimiokulu.com/rfm-analizi-ile-musteri-segmentasyonu/</a></li><li><a href="https://volkanbasar.com/rfm-analysis-and-crm/">https://volkanbasar.com/rfm-analysis-and-crm/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1773c7c5cd9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Calculate Potential Customer Return with Rule-Based Classification]]></title>
            <link>https://medium.com/@bitaazari71/how-to-calculate-potential-customer-return-with-rule-based-classification-10bb628a195b?source=rss-86172a7c6298------2</link>
            <guid isPermaLink="false">https://medium.com/p/10bb628a195b</guid>
            <dc:creator><![CDATA[Bitaazari]]></dc:creator>
            <pubDate>Sat, 18 Dec 2021 00:59:38 GMT</pubDate>
            <atom:updated>2021-12-18T09:36:28.004Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*CPOPXd0ixhh92pMTiavOEQ.gif" /></figure><p>In this article, we are going to analyze the return of potential consumers with python. Since we will use Rule-based classification, then let’s start with a short and brief explanation of Rule-Based classification.</p><p>There are some classification methods, namely Decision-Tree, Rule-Based, and Random Forest. The term rule-based classification as one of the classification method can be used to refer to any classification scheme that makes use of IF-THEN rules by creating “rulesets” in the algorithm for class prediction.</p><p>**IF <em>condition</em> THEN <em>conclusion**</em></p><p>This classification consists of a Rule induction algorithm and Rule ranking measures, the former refers to the process of extracting relevant IF-THEN rules from the data while the latter refers to some values that are used to measure the usefulness of a rule in providing accurate prediction. However, Rule ranking is sometimes used in the rule induction algorithm to eliminate unnecessary rules and improve efficiency. the other usage is as we will use in this project analysis is a class prediction which will utilize to anticipate the class of new cases.rules To answer where are these rules come from, we should study characteristics of this method which contains Mutually exclusive rules and Exhaustive rules but in this project, we don’t need to go deep in , so let’s just start the business problem and go further with analysis.</p><h3>Business problem:</h3><p>A game company would like to create level-based new customer definitions(persona)by using their customer’s features. They will create new segments and would like to predict and estimate how much money they will get approximately from the new potential customers from those segments.</p><h3>Example:</h3><p>How much company can earn from a 25-year-old male from Turkey who is an IOS user.</p><h3>Dataset:</h3><p>Persona.csv dataset shows the number of products sold by an international game company and some demographic information of the users who buy these products. The data set consists of records created in each sales transaction. This means the table “is not deduplicated”. In other words, a user with certain demographic characteristics may have made more than one purchase.</p><h3>Variables :</h3><ol><li>PRICE: Customer spend amount</li><li>SOURCE: The type of device the customer is connecting to (IOS/Android)</li><li>SEX: Gender of the customer</li><li>COUNTRY: Country of the customer</li><li>AGE: Age of the customer</li></ol><p>So far we know the business problem, dataset, and also understood the variables in this project. before starting our analysis let&#39;s think about some required steps :</p><ul><li>Re-read the business problem aim to find out what exactly we need to achieve?</li><li>Check the dataset and variables to get a general idea of data</li><li>What kind of tools and libraries do we need</li><li>And finally, plan our analysis like how to start and finish our work in order to provide an efficient result.</li></ul><h4>Now its time to code :</h4><p>First of all, we need to import the required library, in this case as it can be seen from the code, we imported pandas.</p><p>Some of you may ask what is pandas! (but I’m pretty sure if you read this article, you already knew ), anyway, in short pandas is a Python library used for working with data sets, which has functions for analyzing, cleaning, exploring, and manipulating data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/53de6661601d310f020fba909f06e0e8/href">https://medium.com/media/53de6661601d310f020fba909f06e0e8/href</a></iframe><p>the data from the dataset has been read followed by some general analysis like summary statistics, detecting missing values in the given series object, the shape and the columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*lX77YE1EjGP8POhQvMgEzA.jpeg" /><figcaption><strong>General dataset statistics and analysis</strong></figcaption></figure><p>Now, let&#39;s get more into the details about variables as below :</p><ul><li>How many unique SOURCE are there? What are their frequencies?</li><li>How many unique PRICEs are there?</li><li>How many sales were made in terms of PRICE?</li><li>How many sales were made in terms of the country?</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e8fcf8e1fa5a742456540f4cbea4de8e/href">https://medium.com/media/e8fcf8e1fa5a742456540f4cbea4de8e/href</a></iframe><p>Then, by going further it becomes more interesting . In order to understand the values of multiple variables together and observe their breakdown, we use group by and later we use aggregation functions, you can read from<em> </em><a href="https://pbpython.com/groupby-agg.html"><strong><em>here</em></strong></a> if don’t know these functions yet.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/efae7acf3f9b0a0129aeca1a1d8176f5/href">https://medium.com/media/efae7acf3f9b0a0129aeca1a1d8176f5/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*zRIAsGe2DnMAy-kS_Z1ywQ.jpeg" /><figcaption><strong>Total sale by country</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*wgKviLP1C5VXiXgeICdwgQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*cnEwijyJMTdyWfiHqrbeDg.jpeg" /><figcaption><strong>The PRICE averages in the COUNTRY-SOURCE breakdown</strong></figcaption></figure><p>After all this, we want to get an index and sort it to have a better picture of output. here we will sort the output by price and name it agg_df.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/59b89f9a0007cc3693cc804e387afb81/href">https://medium.com/media/59b89f9a0007cc3693cc804e387afb81/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/96f9f00d431092e98a8f39ce00229b22/href">https://medium.com/media/96f9f00d431092e98a8f39ce00229b22/href</a></iframe><p>After that, We want to divide the customers into certain groups by converting the numerical variable of age into a categorical variable. this is going to be part of segmentation process and getting closer to our objective.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fde20888b701a38eb2d607ce2e1a13cc/href">https://medium.com/media/fde20888b701a38eb2d607ce2e1a13cc/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*Mo_5faOnnwLYruY57Mkaqw.jpeg" /></figure><p>let’s talk a bit about cut() , we use “cut()” function to segregate array elements into separate bins. and also it&#39;s useful when we want to go from continuous variable to categorical.read more <a href="https://pandas.pydata.org/docs/reference/api/pandas.cut.html"><strong><em>here</em></strong></a> about cut() function.</p><p>there is another function its called,qcut(),the difference between those two functions is <strong>qcut will calculate the size of each bin in order to</strong> make sure the distribution of data in the bins is equal. all bins will have (roughly) the same number of observations but the bin range will vary. On the other hand, cut is used to specifically define the bin edges.</p><p>anyway, it is not necessary to be more worried of this definitions, there are many sources and videos you can learn about later. following our project with the next step.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/00c515be48a4b3733940d8ce00626848/href">https://medium.com/media/00c515be48a4b3733940d8ce00626848/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*dRjKxWQC6g0ZaYY5O6VAOw.jpeg" /></figure><p>It’s time to segment customers and calculate some descriptive statistics :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d340dcd6332dae3ed0d9c95b2c85aeb/href">https://medium.com/media/9d340dcd6332dae3ed0d9c95b2c85aeb/href</a></iframe><p>At last, we will learn new customers belong to which segments and also able to know the potential purchases on average.</p><p>let’s try it for a 31–40yrs woman from Turkey who use Android and the same with women in France.</p><blockquote><em>check the out put yousrelf and share with me in the comment 💕😊🤞</em></blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1567b32139a33d6600b228134b5133f4/href">https://medium.com/media/1567b32139a33d6600b228134b5133f4/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*tx6ItK_KBgqYDmPehMkPAw.jpeg" /></figure><p>Resources :</p><p>Decision-Tree, Rule-Based, and Random Forest Classification of High-Resolution Multispectral Imagery for Wetland Mapping and Inventory.<a href="https://www.ncbi.nlm.nih.gov/pubmed/?term=Berhane%20TM%5BAuthor%5D&amp;cauthor=true&amp;cauthor_uid=30147945">Tedros M. Berhane</a>,1 <a href="https://www.ncbi.nlm.nih.gov/pubmed/?term=Lane%20CR%5BAuthor%5D&amp;cauthor=true&amp;cauthor_uid=30147945">Charles R. Lane</a>,2,* <a href="https://www.ncbi.nlm.nih.gov/pubmed/?term=Wu%20Q%5BAuthor%5D&amp;cauthor=true&amp;cauthor_uid=30147945">Qiusheng Wu</a>,3 <a href="https://www.ncbi.nlm.nih.gov/pubmed/?term=Autrey%20BC%5BAuthor%5D&amp;cauthor=true&amp;cauthor_uid=30147945">Bradley C. Autrey</a>,2 <a href="https://www.ncbi.nlm.nih.gov/pubmed/?term=Anenkhonov%20OA%5BAuthor%5D&amp;cauthor=true&amp;cauthor_uid=30147945">Oleg A. Anenkhonov</a>,4 <a href="https://www.ncbi.nlm.nih.gov/pubmed/?term=Chepinoga%20VV%5BAuthor%5D&amp;cauthor=true&amp;cauthor_uid=30147945">Victor V. Chepinoga</a>,5,6 and <a href="https://www.ncbi.nlm.nih.gov/pubmed/?term=Liu%20H%5BAuthor%5D&amp;cauthor=true&amp;cauthor_uid=30147945">Hongxing Liu</a>7</p><ul><li><a href="https://www.tutorialspoint.com/data_mining/dm_rbc.htm">Data Mining - Rule Based Classification</a></li><li><a href="https://bootcamp.veribilimiokulu.com/egitim/veri-bilimci-yetistirme-programi/">Veri Bilimci Yetiştirme Programı</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10bb628a195b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>