<?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 MostDx on Medium]]></title>
        <description><![CDATA[Stories by MostDx on Medium]]></description>
        <link>https://medium.com/@mostdx?source=rss-84253f19889------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ueg_18jYwNlVRh5Z8xoZnw.jpeg</url>
            <title>Stories by MostDx on Medium</title>
            <link>https://medium.com/@mostdx?source=rss-84253f19889------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 23:42:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mostdx/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[AI Based HR Analytics]]></title>
            <link>https://mostdx.medium.com/ai-based-hr-analytics-96affbdd09cf?source=rss-84253f19889------2</link>
            <guid isPermaLink="false">https://medium.com/p/96affbdd09cf</guid>
            <category><![CDATA[hranalytics]]></category>
            <dc:creator><![CDATA[MostDx]]></dc:creator>
            <pubDate>Fri, 15 Apr 2022 07:52:43 GMT</pubDate>
            <atom:updated>2022-04-15T07:52:43.438Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*Pm289RtPRu76FnHAzBCO8Q.png" /></figure><p>The most important asset of companies can be considered as employees. Employee turnover may result in deficiencies in the company’s development goals and plans. Managing employee turnover plays a vital role in reducing costs while contributing to an organization’s productivity and business performance. Retaining a quality employee is more efficient than hiring, training and directing another employee of the same quality.</p><p>The HR department was preparing basic analytical reports on excel boards. Descriptive analytics help us understand “what has happened” across the organization, but to be proactive, understand what will happen in the future and gain competitive advantage, they wanted to find a data driven solution by utilizing machine learning algorithms.</p><p>After a comprehensive literature search, we saw which features and methods were used in previous studies. To this end, we asked the business unit to provide these features.</p><p><strong>Dataset</strong></p><p>In this project, we established HR &amp; Reward analytics based on 3 years of historical data. If I briefly talk about the features we used in the project; as used in the literature, we used metrics such as salary, age, education, grade group, seniority, talent code, years at company, birth date, level, performance score, years with current manager, gender.</p><p><strong>Goal</strong></p><p>We had 2 main goals here;</p><p>1) To predict talent turnover risk through machine learning algorithms for the next 6-month period and come up with actionable insights for HR Business Partners to use in decision making processes and reduce employee turnover.</p><p>2) To understand the relation between reward and talent profiles, detect prospective talent issues/benefits, manage compensation and performance data effectively.</p><p><strong>Approach</strong></p><p>For the above purposes, two analyzes are made, as Diagnostic and Predictive. As the scope of Diagnostic Analysis, there are 2 studies as ANOVA and Data Analysis. The main purpose here is to find if there is a difference based on some factors between the employees who left and those who did not, and if so, what are these factors? Also, one of the main purposes is to see if compensation and performance data are effectively managed and consistent.</p><p><strong>1)</strong> <strong>Diagnostic Analysis</strong></p><p>ANOVA (Analysis of Variance) provides a statistical test of whether two or more population means are equal. If the value is less than 0.05, there is a difference between turnovers and non-turnovers at the &gt;95% confidence level. If the value is between 0.05 and 0.1, there is a difference between turnovers and non-turnovers at the 90%-95% confidence level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G48_qjnk_VIvgwPPS8peLA.png" /><figcaption><em>Table 1: ANOVA</em></figcaption></figure><p>For instance, according to the table above, in Organizations 1 and 2, there is a difference in annual salary between employees who left and those who did not. Except for organization 4, there are differences between other organizations on the basis of age and years at company.</p><p>In data analysis, histogram and boxplot graphics are examined. It can be understood by looking at the peak point of the histogram whether there is a difference in the relevant variables for the employees who left and did not leave. In the example below, we see that there is a difference on the basis of age, since the peak points are different.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*uuQfdNLIbIVmtJ6yNYgAsw.png" /><figcaption><em>Figure 1:</em> <em>Histogram for Age</em></figcaption></figure><p>The boxplot is used to visually show the distribution of variability by displaying data quartiles and means.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tYsQWXBfkHJ-2tW5nfaoiQ.png" /><figcaption><em>Figure 2: Boxplot of Salary and Organization</em></figcaption></figure><p>Considering the general distribution in the boxplots above, we do not see much difference in the average salary of employees who left and who did not, but there is more outlier value in employees who did not leave.</p><p><strong>1)</strong> <strong>Predictive Analysis</strong></p><p>As the scope of Predictive Analysis, the study is carried out on 4 bases. This study is conducted to predict next 6-month turnover risk as the organization-based, function-based,talent code-based voluntary turnover and organization-based all turnovers.</p><p>Many algorithms such as neural network, decision tree, random forest, logistic regression, gradient boosting used in studies in the literature have been tried. After using various algorithms, Gradient Boosting with the lowest MAPE value was chosen.</p><p><strong>Conclusion</strong></p><p>The HR department have started to use the first outcomes in determining optimal salary ranges of talented employees. This way, they will be able to allocate the budget more effectively taking the parameters based these outcomes into consideration.</p><p>Considering the researches, we can say that an average employee in an average position can reach the optimal productivity level in 6–7 months. Retaining talent by taking proactive actions means saving 6–7 months total employee cost per talent.</p><p>From this point forward, the HR department will be using analytical methods to retain top talent employees.</p><p>I hope you enjoyed this article; if you are interested in optimization, machine learning and computer vision, check out other articles where we explain our approaches and solutions to problems of our business units in Yıldız Holding.</p><p><strong>Zeynep Deniz CANKUT- Data Scientist</strong></p><p>Sincere thanks to Sabri Yılmaz for his mentorship and special thanks to Tunahan Aktaş &amp; Doğukan Göksu for their contribution to this project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96affbdd09cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Route Planning Using Genetic Algorithm]]></title>
            <link>https://mostdx.medium.com/route-planning-using-genetic-algorithm-d615b67ccd98?source=rss-84253f19889------2</link>
            <guid isPermaLink="false">https://medium.com/p/d615b67ccd98</guid>
            <category><![CDATA[route-optimization]]></category>
            <category><![CDATA[genetic-algorithm]]></category>
            <dc:creator><![CDATA[MostDx]]></dc:creator>
            <pubDate>Wed, 13 Apr 2022 10:26:05 GMT</pubDate>
            <atom:updated>2022-04-13T10:26:05.681Z</atom:updated>
            <content:encoded><![CDATA[<p>With the advance of technology, when getting one location to another, we can know which direction or path is most efficient by simply typing the names of locations. Well, what would you do in the case that you need to go from not just one place to another but from one place to many, let’s say 10 or 100 places. How would you cope with this situation? Of course, in daily life, factories are trying to solve this routing problem rather than human beings and this article has been written to give information about how to handle route optimization with the nature-inspired artificial intelligence algorithm.</p><p>To begin with, let’s define the problem first. The objective is to minimize costs by optimizing the vehicles’ paths meeting customer demand with the work shift, service time, and time window constraints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*4ZoM2AnJ4XxL_Y8lxjYorw.png" /><figcaption><em>Image Source: The paper named Order of Emergency Orders in a Company of Distribution of Electrical Energy</em></figcaption></figure><p>This problem can be evaluated as a multiple Traveling Salesman Problem. The complexity of this kind of problem is calculated as such. Let`s say we have n many customers and k many vehicles. Roughly speaking, with brute force, we have 2 to the k many solutions and among those solutions, there is only one optimal solution. So, there are many solving techniques suitable for the problem but here genetic algorithm (GA) has been implemented. So, what is the genetic algorithm then? How does it work? Let’s go deeper into the algorithm.</p><p>Genetic algorithm is an algorithm that is based on a biological concept of survival of the fittest. Survival of the fittest is an on-going process and there is a selection part of it. To be able to select something or someone, you need to differentiate it. So, there must be a criterion or a metric for it, which corresponds to fitness function here. This function calculates the total kilometers of a candidate path by using distance time matrix.</p><p>At this point, it is good to mention the construction of distance matrix. It keeps the distances from i to j and we use an open-source geographical map called Open Street Map to get it.</p><p>So, using the distance matrix, fitness scores of all paths are calculated and the ones with higher fitness values are more likely to be selected in order to generate new offspring. This is the core idea behind the genetic algorithm. To go deep into it, we need to know the components of the algorithm.</p><p>Modules of GA needed to know are gene, chromosome, individual, population, mating pool, fitness, mutation, and elitism. Let’s define it one by one and after that, we elaborate on the logic of the algorithm.</p><p>· Gene is a city carrying x and y coordinates.</p><p>· Chromosome contains genes and the order of gene is defining which city is to visit in which order.</p><p>· Individual is made up of chromosome and therefore it is candidate route.</p><p>· Population consists of individuals, i.e. possible route samples.</p><p>· Parents are two individuals.</p><p>· Mating pool is a collection of selected individuals to create new offspring.</p><p>· Fitness is a metric describing how short a single route is.</p><p>· Mutation is to shift the genes order in an individual.</p><p>· Elitism is how many to select from a population.</p><p>Initially, a population is generated based on a given city list. So, every individual in the population has a fitness score. Based on a fitness score, the individuals are selected for the mating pool so that they can create better children(individuals) by changing the information by one another. In addition to that, there is a mutation process that shuffles genes in an individual based on a certain probability. Then elitism process comes into view; that is, top X individuals are to be carried to the next iteration. And the process continues until no improvement, as in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*4B6v0LSBAQl9MMeUz0s9vQ.png" /><figcaption><em>Figure has been taken from </em><a href="https://medium.com/geekculture/introduction-to-genetic-algorithm-d417119040b7"><em>https://medium.com/geekculture/introduction-to-genetic-algorithm-d417119040b7</em></a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nDWKkN-S6aE-BNVJHmbuJg.png" /><figcaption><em>From the figure, it can be seen here that, for one depot, the initial km is 8.000 km and after 60000 iterations, the final distance is 1.400 km. The percentage of improvement is %80. And it can be deduced that the acceleration of improvement is slowing down when the generation number is increasing.</em></figcaption></figure><p>So, the last thing that is good to be done is sensitivity analysis to find the optimal values of variables. To do that, as in the figure below, you create a grid search of the parameters and after that you look for, using some techniques, which values give the most desired outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*UnCV6zHqfaTP7i4eFZu0yg.png" /><figcaption><em>X1 and X2 are parameters and the outcomes are changing when x1 and x2 values differ. So, the aim here is to try values in a given range per parameter to be able to find the best combination of values. Image source: </em><a href="https://en.wikipedia.org/wiki/Hyperparameter_optimization"><em>https://en.wikipedia.org/wiki/Hyperparameter_optimization</em></a></figcaption></figure><p>So, by implementing GA, we made a ≈ 45% improvement in total distance traveled and ≈ 25% decrease in hours worked and ≈ 30% improvement in the efficiency of use of vehicles, and total contribution to the factory budget is nearly half a million on a year basis.</p><p>Other than that, genetic algorithm can be used other areas as well and some of them are: Economics, Neural Networks, Image Processing, Vehicle Routing Problems, Scheduling Applications, Machine Learning, Robot Trajectory Generation, Parametric Design of Aircraft, DNA Analysis, Multimodal Optimization, Traveling salesman problem and its applications.</p><p>To sum up, in this paper we can see a real-life example of routing problem, tsp concept, how to deal with this problem with genetic algorithm, and application areas of genetic algorithm. Hope you enjoy reading this article.</p><p>Also special thanks to Berat Utkan Menteş giving so much effort for the contribution of the projects and to my team keeping me motivated all the time</p><p>Murat Ayvaz — Data Scientist</p><p><strong>References</strong></p><p>[1]<a href="https://www.tutorialspoint.com/genetic_algorithms/genetic_algorithms_application_areas.htm">https://www.tutorialspoint.com/genetic_algorithms/genetic_algorithms_application_areas.htm</a></p><p>[2]Solving the Vehicle Routing Problem with Genetic Algorithm and Simulated Annealing by Ákos Kovács</p><p>[3]<a href="https://en.wikipedia.org/wiki/Travelling_salesman_problem">https://en.wikipedia.org/wiki/Travelling_salesman_problem</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d615b67ccd98" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HOW TO OPTIMIZE PRICE?]]></title>
            <link>https://mostdx.medium.com/how-to-optimize-price-49eb4c2c4ab?source=rss-84253f19889------2</link>
            <guid isPermaLink="false">https://medium.com/p/49eb4c2c4ab</guid>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[price-optimization]]></category>
            <category><![CDATA[demand]]></category>
            <dc:creator><![CDATA[MostDx]]></dc:creator>
            <pubDate>Wed, 13 Apr 2022 08:35:46 GMT</pubDate>
            <atom:updated>2022-04-13T08:35:46.263Z</atom:updated>
            <content:encoded><![CDATA[<p>Price optimization utilizes data and mathematical analysis to determine the best price that will meet decision makers’ objectives such as maximizing profit. Pricing has significant importance for the companies since it defines the value of a product and affects customer’s willingness to pay. Price of a product determines the profit margin, therefore optimizing price can have a substantial contribution on companies’ profitability.</p><p>The project is conducted for a company having retail stores in several cities in Turkey. Customer groups are including business-to-consumer category. There are more than 4000 different product types.</p><p><strong>Methodology</strong></p><p><strong>Demand Forecasting</strong></p><p>The proposed methodology consists of two main steps, which are demand forecasting for next period and estimating price elasticity of demand for the products. Therefore, at first, we try to estimate what amount of a product will sell in next period. This part of the methodology is a classical forecasting problem. In this blog we will not go further in terms of explaining forecasting deeply. There are plenty of algorithms, methodologies to predict sales, we applied auto-forecasting process for more than 4000 products.</p><p>In order to yield accurate results, it is important to identify factors that have significant effect on sales. Features, also called exogenous variables, can vary on concept of the problems. We didn’t include <em>price</em> as exogenous variable in the forecasting model, which has major impact on sales. We exclude price from the model on purpose. If we add the price as a feature in the model, we must use it to predict next month’s sales. However, it is yet unknown what price should be used for the product. We need to know that how much the product will sell in next month without the effect of price because later we will add the price effect on the forecasting results and come up with an optimum price.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6tcPbxk_lVJ97d2q6JiqOw.png" /><figcaption>Table 1: Price optimization framework</figcaption></figure><p><strong>Price elasticity of demand</strong></p><p>In the previous part we forecasted number of sales for the next period. Now we try to figure out how changes in price will affect the demand and subsequently predict how demand varies at different price points.</p><p>Before going further let us define price elasticity and how it contributes the proposed optimization model. Price elasticity of demand is a measurement of the change in sales of a product in relation to a change in its price. It shows how sensitive demand is to the price changes. In this regard some products show dramatic changes in sales over time due to price changes. These products are called <strong>elastic</strong> products. If price changes don’t have high impact on sales, it is called <strong>inelastic</strong> product.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*Pr7kQqoMK5JGdgqXgjkGzw.png" /></figure><p>In order to estimate price elasticity of products, we applied regression model with logarithmic transformation, which is log-log regression model. This model is efficacious while the price-demand relationship is nonlinear.</p><p>After performing a log-log model, the coefficient can be used to determine the impact of independent variables (X-price) on dependent variable (Y-demand), where and are the time components seasonality and trend respectively. The coefficients in a log-log model represent the elasticity of Y variable with respect to X variable. As we defined earlier, the coefficient is the estimated percent change in the dependent variable for a percent change in the independent variable.</p><p>Accuracy of is crucial point to estimate optimum price. We expect since the fact that increasing price leads to decrease in demand. Otherwise, optimum price of a product may enormously large.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*344NrTt8sP_1-Gv_edi7dg.png" /><figcaption>Table 2: Impact of independent variable</figcaption></figure><p>After receiving price elasticity of each product, we can build price vs profit function graph. In the below formula when we substitute in, we receive a quadratic equation. It yields a concave graph where the corresponding x axis value to maximum y value gives the optimum price. As an example in table 3, optimum price for a product is 32.13 TL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*Y0vNoB1s1UA2dtK6JwLxuQ.png" /></figure><p>where is price, is last price of the product, is the predicted demand, is updated demand when we changed price from to, is price elasticity in terms of percent change, is the profit and is the cost of the product.</p><p><strong>Business Rules</strong></p><p>Business rules structures the methodology, the proposed results may be reformed by the business owners or market rules. For example, they may prefer specific rate of increasing and decreasing in prices. In this case they would prefer to choose among the prices near to optimum rather than applying exact optimum point.</p><p><strong>Test and Results</strong></p><p>Test process is necessary to verify result and observe the customer behaviors to price changes. Twenty stores were chosen as test and control groups, each has 10 number of stores. In test group price of the products have changed to estimated optimum price, and in control groups the prices remained the same. For two weeks test period, we reached 9% more profitability than control groups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JBuGsuaJ2YDbENHmoL3ZCw.png" /><figcaption>Table 3: Price vs profit graph of a product</figcaption></figure><p>Zeynep Kezban TURGUT -Data Scientist</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49eb4c2c4ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RECOMMENDATION SYSTEMS AND CROSS SELLING APPROACHES FOR BIZIM TOPTAN MARKETS]]></title>
            <link>https://mostdx.medium.com/recommendation-systems-and-cross-selling-approaches-for-bizim-toptan-markets-b1a476b5ec71?source=rss-84253f19889------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1a476b5ec71</guid>
            <category><![CDATA[cross-selling]]></category>
            <category><![CDATA[recommendation-system]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[MostDx]]></dc:creator>
            <pubDate>Wed, 13 Apr 2022 08:24:52 GMT</pubDate>
            <atom:updated>2022-04-13T08:24:52.994Z</atom:updated>
            <content:encoded><![CDATA[<p>In our constantly digitalizing environment, it is getting more important and much preferred for the companies to provide personal suggestions to their customers. Especially in grocery retail, there is a high profit potential for those companies which would like to increase sales by offering personalized product suggestions, which ensures sustainable customer satisfaction as well.</p><p>For this purpose, the recommendation systems play a key role in customer relationship management. As the aim of recommender systems is to provide suggestions to a set of customers on products that might be interesting for them according to their preferences or interests about the particular products in the past. That is, it can be said that a recommender system has the ability to predict whether a particular customer would prefer a product or not based on the customer’s profile and its historical information.</p><p>As a result of the comprehensive understanding of customer profiles, we developed a “Personalized Cross-Sell Activity Model” for Bizim Toptan Markets by using Collaborative Filtering method which is the most famous suggestion engine of recommender systems in machine learning. With this project, we aim;</p><p>- to increase possibility to buy for non-purchased but high potential products,</p><p>- to reach and communicate to our customers with highly potential product recommendations thanks to customization,</p><p>- to enrich advanced data analytics and AI model by cross-sell knowhow.</p><p><strong>PROBLEM APPROACH</strong></p><p>The underlying assumption of the collaborative filtering approach is that if a customer A has the same opinion as a customer B on a set of products, A is more likely to have B’s opinion for a given product than that of a randomly chosen customer. So, to calculate the similarities between customers and products, we applied two main strategies in collaborative filtering; Memory-based approach and Model-based approach.</p><p><strong><em>Memory-based Approach: </em></strong>This approach uses the memory of previous customers interactions to compute customers similarities based on products they have bought or interacted (user-based approach) or compute products similarities based on the customers that have interacted with them (item-based approach).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hkYZ1kdBpn4UuZDGYP_quQ.png" /></figure><p>As an example of user-based CF, if we have an <em>n x m</em> ratings matrix, with customer c<em>, i=1,2,3,…n</em> and product p, <em>j=1,2,3,…m</em> and here we would like to predict the rating r if the target customer <em>i</em> did not buy a product<em> j.</em></p><p>For this approach, we used User Neighborhood-based CF, in which the closest top-N customers were selected for a customer and used to suggest the most popular products among these neighbors, but the current customer did not buy yet.</p><p><strong><em>Model-based Approach: </em></strong>In this approach, there are many different machine learning algorithms to develop a model and recommend products to customers, but we used a popular matrix factorization model named Singular Value Decomposition (SVD).</p><p>This SVD model compresses user-item matrix into a low-dimensional representation in terms of latent factors and thus, instead of having a high dimensional matrix which includes lots of missing values we deal with a reduced presentation of that matrix in lower-dimensional space to handle the <em>sparsity</em> of original rating matrix.</p><p><strong>DATASET</strong></p><p>As known, to generate the user-item matrix, it is actually customer-product matrix in our scenario, we absolutely need the information about how much a costumer like a particular product or in other words, if we ask a customer to rate a product, what rating will be given for it. We calculated these product ratings for each customer separately according to customers’ historical data in last year by using 4 key metrics;</p><p><em>i.</em> <em>Total sales quantity of the product,</em></p><p><em>ii.</em> <em>Sales Frequency of the product,</em></p><p><em>iii.</em> <em>The number of different months the product sold,</em></p><p><em>iv.</em> <em>Recency of the product</em></p><p>Then, we applied data binning technique and scored each metric from 1 to 4 points. To get a final rating score for each product, we calculated sum of customer-based points and created a user-item matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*VwV0Rhok-7i2dPoN-ZKvEw.png" /><figcaption><em>Table 1. User-Item Rating Matrix</em></figcaption></figure><p>§ <strong>DEVELOPMENT</strong></p><p>In this project, we focused on the product-based trends of our 300,000 B2B customers by examining their purchasing behavior for the last year and modelling with machine learning algorithms. After many test results, we realized that model-based approach consistently gave much better solutions rather than memory-based one. Therefore, we decided to use matrix factorization model, SVD, for further steps. General formula of SVD is:</p><p><strong>M</strong>=<strong>UΣV</strong>ᵗ, where:</p><p>· <strong>M</strong>-is original matrix</p><p>· <strong>U</strong>-is left singular matrix (columns are left singular vectors). <strong>U</strong> columns contain eigenvectors of matrix <strong>MM</strong>ᵗ</p><p>· <strong>Σ</strong>-is a diagonal matrix containing singular (eigen)values</p><p><strong>V</strong>-is right singular matrix (columns are right singular vectors). <strong>V</strong> columns contain eigenvectors of matrix <strong>M</strong>ᵗ<strong>M</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*VhqsH3P0Td80fWPO6s6QmQ.png" /><figcaption><em>Figure 1. Visualization of the matrix multiplications in SVD</em></figcaption></figure><p>For each customer, we identified the products that they did not purchased before, the best matching ones according to their purchasing tendency. Also, adding new training data in every month ensured that our cross-sell activity model had ability to catch the changing behaviors of customers. When it came to determining communication channels of our customers, we preferred to use SMS campaign communication and sent the personalized product suggestions to the customers via SMS activities.</p><p>In order to measure the success of the model, we randomly created a 25% control group and 75% campaign group in each campaign and compared each group according to project KPIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*EIQhkRGH-DQRQ2lC-aTQhA.png" /><figcaption><em>Figure 2. Project Development Lifecycle</em></figcaption></figure><p>§ <strong>RESULTS AND PROJECT OUTPUTS</strong></p><p>After analysis of our model results, we realized that campaign group’s KPIs were higher than control group and significant gains were achieved in terms of making the accurate campaign offer and communicating to customers with the right products.</p><p>Compared to the control group, the results of the customers offered the activity and increase rates as below;</p><ul><li>26% participation in the activity (from 3% to 3.8%)</li><li>49% in average basket amount (from 628 to 938)</li><li>28% in average basket variety (from 8.65 to 11.08)</li><li>684% in turnover (from 4.1 M TL to 32.4 M TL in 6 months)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HFnBxhGX7_hjmvCIWp976w.png" /></figure><p>Also, in this study, we observed that we were able to increase sales from non-activity products at higher rates compared to the control group. In other words, when we brought the customer to our store with the right products that might be of interest, we ensured that products other than the offer were also added to the basket.</p><p><strong>CONCLUSION</strong></p><p>As a result, our cross-sell activity model enables customized campaign management by continuously learning customers’ purchasing habits and product tendencies. Thus, it is a tremendous improvement for us to increase sales significantly with more accurate product recommendation and more focused campaign targeting.</p><p>I would like to thank all my team members for their great contributions to the project and really appreciate their support.</p><p><strong>Talip Akdemir — Data Scientist</strong></p><p><strong>References</strong></p><p>1.<a href="https://towardsdatascience.com/simple-svd-algorithms-13291ad2eef2">https://towardsdatascience.com/simple-svd-algorithms-13291ad2eef2</a></p><p>2.<a href="https://en.wikipedia.org/wiki/Singular_value_decomposition#Relation_to_eigenvalue_decomposition">https://en.wikipedia.org/wiki/Singular_value_decomposition#Relation_to_eigenvalue_decomposition</a></p><p>3.<a href="https://jeremykun.com/2016/05/16/singular-value-decomposition-part-2-theorem-proof-algorithm/">https://jeremykun.com/2016/05/16/singular-value-decomposition-part-2-theorem-proof-algorithm/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1a476b5ec71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PROPENSITY SCORE PREDICTION]]></title>
            <link>https://mostdx.medium.com/propensity-score-prediction-9c14fdbfd90a?source=rss-84253f19889------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c14fdbfd90a</guid>
            <category><![CDATA[gradient-boosting]]></category>
            <category><![CDATA[crisp-dm]]></category>
            <category><![CDATA[propensity-score]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[MostDx]]></dc:creator>
            <pubDate>Tue, 12 Apr 2022 11:41:20 GMT</pubDate>
            <atom:updated>2022-04-12T11:41:20.721Z</atom:updated>
            <content:encoded><![CDATA[<p>It is a common practice for companies to predict purchasing behavior of their customers under certain conditions. One of the methods is propensity score prediction to achieve this purpose. Propensity score prediction model helps us determine whether target customers are likely to purchase a custom product or not. Thus, companies can get to know the customers better, understand their specific needs and make more relevant product offers to them. In this blog we will explain how we handle the problem, and which processes we follow to design and implement the propensity score prediction project.</p><p>The life cycle of a data mining project consists of six phases such as Business Understanding, Data Understanding, Data Preparation, Modeling, Evaluation and Deployment. The sequence of those sequential but moving back and forth between the steps may requires.</p><figure><img alt="Figure 1: CRISP-DM Structure" src="https://cdn-images-1.medium.com/max/581/1*jKJ0xIqUM3HCzB7ox3DRXw.png" /><figcaption><strong>Figure 1: CRISP-DM Structure</strong></figcaption></figure><p><strong>Business Understanding</strong></p><p>The company works as a fast-moving consumer goods (FMCG) retailer who services ~12000 active customers majority of whom is b2b and smaller quantity is b2c customers. The customers service to wide range of work fields such as catering, bakery, hotel, restaurant, and café etc. It supplies to them ~6000 unique products including convenience food, bakery raw materials, beverage, sanitizers, cleansers etc. We aim to make more relevant product offers to the customers by looking at their past purchase behaviors using machine learning models.</p><p><strong>Data Understanding</strong></p><p>We transferred the data into our databases via ETLs that includes the customer, product, purchase order, and sales tables. We try to determine which columns of the data to be used to create models.</p><p><strong>Data Preparation:</strong></p><p>In the data preparation phase, we clean, visualize, merge, and reformat the data, derive the new features. In addition, we fill the null interval features using median or mean and categorical features with the mode values.</p><p>Moreover, customer-based, product-based, higher level customer category, higher level product category and customer-product based features are created for 1-, 2-, 3-, 6- and 12-months periods using last year history data. Some of the numerical features derived are as follows:</p><p>· Customer recency, frequency, monetary values for a product</p><p>· Customer recency, frequency, monetary values for a year</p><p>· Average number of unique products of a basket for a customer</p><p>· Average amount of payment of a customer for a basket</p><p>· Applied price policy to the customer for a product: regular or special offer</p><p>· Amount of order and payment of a customer for a product</p><p>· Amount of order and payment of a customer for a higher-level product category</p><p>· Amount of order and payment of a higher-level customer group for a product</p><p><strong>Modeling and Evaluation:</strong></p><p>In modelling phase, we build a supervised machine learning model to predict how a customer is likely to purchase a product.</p><p>First, we separate the data into the train set and the test set. We obtain the features from history data and select the customers as a target who order during the next month. We use this period as a train set. We evaluated the model with the test set which is unseen before and the next month after the target period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jVRuRF-B0MQhihcK7LopjA.png" /><figcaption><strong>Figure 2: Modelling Architecture</strong></figcaption></figure><p>Firstly, we eliminate the correlated features. Then we run the 5-fold cross validation on the train set and select the best k-features to generalize the model predicting the target.</p><p>We train the model with the selected features via several algorithms such as neural networks, Random Rorest, Xgboost, Light-gbm and Cat-boost with different parameter combinations.</p><p>We choose the best model using evaluation metrics such as precision and recall and score the test set which had not seen before by the model. The best algorithm is the Light-gbm with the precision rate of 86% and the recall rate of 84% in the validation set. When we evaluate with the test set, the precision rate is 76% and the recall rate becomes 75%.</p><p>In this part, we mention about the relatively new-brand algorithms to build a model that are Light-gbm and Cat-boost.</p><p><strong><em>Light Gradient Boosting Machine<br> </em></strong>Regular Gbm based algorithms has a level-wise tree growth. The algorithm finds the best split for each node in the same level, then gets into the deeper level that makes the algorithm slower. However, Light-gbm has an asymmetrical leaf-wise growth algorithm and doesn’t have to create all node splits in the same level. So, it is faster than gradient boosting machine. It can also handle large sized sparse data. It is just because of two features:</p><p>GOSS — Gradient Based One Sided Sampling: It makes down sampling to decrease data size. It selects the most representative observations having higher gradients and takes some of the random observations having lower gradient.</p><p>EFB — Exclusive Feature Bundling: Data having a lot of features makes difficult to build a tree. To decrease the complexity of building, it bundles highly sparse features like one-hot encoded features and creates fewer dense features.<strong><em>CatBoost</em></strong></p><p>Most machine learning algorithms work only with numerical data. We transform the categorical features into one-hot encoded or label-encoded features. One hot encoding makes difficult to build trees especially when the dataset consists of high cardinality categorical features. CatBoost algorithm is developed to handle this kind of categorical features. It has a leaf-wise tree grown and handles null values and categorical features with self-encoding.</p><p>It solves the problem by taking lots of random permutations of the dataset.</p><p>Then it represents categorical values with the numerical values which are the mean of the target variable for the samples in the same one encoded category. Each permutation means a different dataset, so the numerical equivalent of them changes for each dataset. Thus, it helps preventing the categorical variables being dependent to the target. Besides, computational time will be lower since we don’t have to create n columns for each categorical variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*l0Nq7TzeSsyQZj30X6oRag.png" /><figcaption><strong>Figure 3: Tree Building Methods</strong></figcaption></figure><p><strong>Deployment:</strong></p><p>In the beginning of the month, we run the model, score the data, and order the prediction probabilities of each customer for purchasing a product. We take the top 10 products having highest probabilities per customer. We make the product offers to the customers via customer representatives.</p><p>Briefly, in this blog we explain the whole pipeline to build a propensity score prediction model. The model helps to understand special needs of customers and make more relevant products offers to them.</p><p>Finally, I would like to thank you my mentor, Sabri Yılmaz who always guides, assists, and supports me during the whole project implementation steps.</p><p><strong>Resources:</strong></p><p><a href="https://www.datascience-pm.com/crisp-dm-2/">https://www.datascience-pm.com/crisp-dm-2/</a></p><p><a href="https://deep-and-shallow.com/2020/02/21/the-gradient-boosters-iii-lightgbm/">https://deep-and-shallow.com/2020/02/21/the-gradient-boosters-iii-lightgbm/</a></p><p><a href="https://deep-and-shallow.com/2020/02/29/the-gradient-boosters-v-catboost/">https://deep-and-shallow.com/2020/02/29/the-gradient-boosters-v-catboost/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c14fdbfd90a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>