{"id":3831,"date":"2014-08-14T06:47:20","date_gmt":"2014-08-14T01:17:20","guid":{"rendered":"http:\/\/ucanalytics.com\/blogs\/?p=3831"},"modified":"2016-10-12T23:06:40","modified_gmt":"2016-10-12T17:36:40","slug":"decision-tree-entropy-retail-case-part-6","status":"publish","type":"post","link":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/","title":{"rendered":"Decision Tree &#8211; Entropy &#8211; Retail Case Study Example (Part 6)"},"content":{"rendered":"<div id=\"attachment_3832\" style=\"width: 316px\" class=\"wp-caption alignright\"><a href=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg\"><img aria-describedby=\"caption-attachment-3832\" data-attachment-id=\"3832\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/photo-2-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&amp;ssl=1\" data-orig-size=\"994,1400\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Entropy \" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Entropy &#8211; by Roopam&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=213%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=640%2C901&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-3832\" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?resize=306%2C429\" alt=\"Entropy - by Roopam\" width=\"306\" height=\"429\" srcset=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?resize=213%2C300&amp;ssl=1 213w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?zoom=2&amp;resize=306%2C429 612w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?zoom=3&amp;resize=306%2C429 918w\" sizes=\"(max-width: 306px) 100vw, 306px\" data-recalc-dims=\"1\" \/><\/a><p id=\"caption-attachment-3832\" class=\"wp-caption-text\"><span style=\"font-size: 8pt;\"><strong>Entropy : from order to disorder\u00a0&#8211; by Roopam<\/strong><\/span><\/p><\/div>\n<hr \/>\n<p>This article is a continuation of the retail case study example we have been working on for the last few weeks. You can find the previous parts of the case study example at the following links:<\/p>\n<p>Part 1:\u00a0<a href=\"http:\/\/ucanalytics.com\/blogs\/marketing-analytics-retail-case-study-part-1\/\">Introduction<\/a><br \/>\nPart 2:\u00a0<a href=\"http:\/\/ucanalytics.com\/blogs\/marketing-analytics-retail-case-study-part-2\/\">Problem Definition<\/a><br \/>\nPart 3:\u00a0<a href=\"http:\/\/ucanalytics.com\/blogs\/exploratory-data-analysis-retail-case-study-part-3\/\">EDA<\/a><br \/>\nPart 4:\u00a0<a href=\"http:\/\/ucanalytics.com\/blogs\/association-analysis-retail-case-study-part-4\/\">Association Analysis<\/a><br \/>\nPart 5: <a href=\"http:\/\/ucanalytics.com\/blogs\/decision-tree-cart-retail-case-part-5\/\">Decision Tree (CART)<\/a><\/p>\n<p>If you recall from <a href=\"http:\/\/ucanalytics.com\/blogs\/decision-tree-cart-retail-case-part-5\/\">the previous article<\/a>, the\u00a0CART algorithm\u00a0produces\u00a0decision trees with just binary child nodes. In this article, we will learn another\u00a0algorithm to produce multiple child nodes decision trees. There are several ways to achieve this objective such as CHAID (CHi-squared Automatic Interaction Detector). \u00a0Here, we will learn about the c4.5 algorithm to produce multiple child nodes decision trees. Since it uses a concept very close to my heart:<\/p>\n<h2><span style=\"color: #3366ff;\">Entropy<\/span><\/h2>\n<p>In high school, we were taught the first law of thermodynamics about conservation of energy. It says:<\/p>\n<blockquote><p>Energy can neither be created nor destroyed, or in other words the total\u00a0energy for the Universe is constant.<\/p><\/blockquote>\n<p>The first\u00a0reaction from most students after learning this fact was : why bother saving electricity, and fuel? If the total energy of the universe is constant and conserved\u00a0then we have an infinite amount of energy for usage that will never be destroyed.<\/p>\n<p>The second law of thermodynamics, however, demolishes this comfort about wasting power. Entropy is at the root of the second law of thermodynamics. Entropy is \u00a0the measure of disorder or randomness in the Universe. The general direction of the Universe is from order to disorder or towards\u00a0higher randomness. The second law states that:<\/p>\n<blockquote><p>Total entropy or overall disorder \/ randomness of the Universe is always increasing.<\/p><\/blockquote>\n<p>OK, let&#8217;s take an example to understand this better. When you use fuel to run your car, a perfectly ordered petrol (compact energy) is converted\/dissipated to disordered forms of energy like heat, sound, vibrations etc. The work is generated in the process to run the engine of the car. The more disordered or random the energy is the harder\/impossible it is to extract purposeful work out of it. So I guess, we care about work and not energy. In other words, higher the entropy or randomness of a system the harder it is to convert it to meaningful work. Physicists define the entropy of a system with the following formula:<\/p>\n<pre><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=Entropy%3DS%3D-%5Csum+p%7B_%7Bi%7D%7D%5Ctimes+log_%7B2%7D%28+p_%7Bi%7D%29+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"Entropy=S=-&#92;sum p{_{i}}&#92;times log_{2}( p_{i}) \" class=\"latex\" \/><\/pre>\n<p>Entropy is also at the heart of information theory. It took the ingenuity of Claude Shannon, the father of information theory, to see the links between thermodynamics and information. He proposed the following definition of entropy to measure randomness within a given message.<\/p>\n<pre><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=Entropy%3DH%3D-%5Csum+p%7B_%7Bi%7D%7D%5Ctimes+log_%7B2%7D%28+p_%7Bi%7D%29+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"Entropy=H=-&#92;sum p{_{i}}&#92;times log_{2}( p_{i}) \" class=\"latex\" \/><\/pre>\n<p>For instance entropy (randomness) of a fair coin, with the equal chance of heads &amp; tails, is 1 bit (as calculated below). Notice, the unit of entropy in information theory is a bit as coined by Claude Shannon. This same unit is used as the fundamental unit of computer storage.<\/p>\n<pre><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=Entropy%3DH%3D-%2850%5C%25%5Ctimes+log_%7B2%7D%2850%5C%25%29%2B%281-50%5C%25%29%5Ctimes+log_%7B2%7D%281-50%5C%25%29%29%3D1bit+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"Entropy=H=-(50&#92;%&#92;times log_{2}(50&#92;%)+(1-50&#92;%)&#92;times log_{2}(1-50&#92;%))=1bit \" class=\"latex\" \/><\/pre>\n<p>We will use the same formula for entropy to create decision tree and decipher information within the data.<\/p>\n<h2 style=\"color: #555555;\"><span style=\"color: #3366ff;\">Retail Case Study Example \u2013 Decision Tree (Entropy : C4.5 Algorithm)<\/span><\/h2>\n<p>Back to our retail case study Example, where you are\u00a0the Chief Analytics Officer &amp; Business Strategy Head at an online shopping store called DresSMart Inc. that specializes in apparel and clothing. In this case,\u00a0your effort is to improve a future\u00a0campaign\u2019s performance. To meet this objective, you are analyzing data from an earlier campaign where\u00a0direct mailing product catalogs were sent to one hundred thousand customers from the complete customer base of over a couple of million customers. \u00a0The overall response rate for this campaign was 4.2%.<\/p>\n<p>You have divided the total hundred thousand solicited customers into three categories based on their past 3 months activities before the campaign.\u00a0This is the same table we have used in the previous article to create the decision tree using\u00a0the\u00a0<a href=\"http:\/\/ucanalytics.com\/blogs\/decision-tree-cart-retail-case-part-5\/\">CART algorithm<\/a>.<\/p>\n<table style=\"width: 561px;\" border=\"2\" width=\"561\">\n<tbody>\n<tr style=\"background-color: #1a8fe4; border: 1px solid #000000;\">\n<td rowspan=\"2\" width=\"191\"><span style=\"color: #ffffff;\"><strong>Activity in the Last\u00a0Quarter<\/strong><\/span><\/td>\n<td rowspan=\"2\" width=\"100\"><span style=\"color: #ffffff;\"><strong>Number of Solicited Customers<\/strong><\/span><\/td>\n<td style=\"text-align: center;\" colspan=\"2\" width=\"171\"><span style=\"color: #ffffff;\"><strong>Campaign Results<\/strong><\/span><\/td>\n<td rowspan=\"2\" width=\"99\"><span style=\"color: #ffffff;\"><strong>Success\u00a0Rate<\/strong><\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #1a8fe4; border: 1px solid #000000;\">\n<td><span style=\"color: #ffffff;\"><strong>Responded (<em>r<\/em>)\u00a0<\/strong><\/span><\/td>\n<td><span style=\"color: #ffffff;\"><strong>Not\u00a0Responded (<em>nr<\/em>)<\/strong><\/span><\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"background-color: #fdc9a4;\"><strong>low<\/strong><\/td>\n<td>40000<\/td>\n<td>720<\/td>\n<td>39280<\/td>\n<td>1.8%<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"background-color: #fdc9a4;\"><strong>medium<\/strong><\/td>\n<td>30000<\/td>\n<td>1380<\/td>\n<td>28620<\/td>\n<td>4.6%<\/td>\n<\/tr>\n<tr style=\"border: 1px solid #000000;\">\n<td style=\"background-color: #fdc9a4;\"><strong>high<\/strong><\/td>\n<td>30000<\/td>\n<td>2100<\/td>\n<td>27900<\/td>\n<td>7.0%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>The following is the\u00a0binary node tree we have generated through the CART in the previous article.<\/p>\n<div id=\"attachment_3744\" style=\"width: 581px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/Decision-Tree-The-CART.jpg\"><img aria-describedby=\"caption-attachment-3744\" data-attachment-id=\"3744\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/decision-tree-cart-retail-case-example-part-5\/decision-tree-the-cart\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/Decision-Tree-The-CART.jpg?fit=650%2C398&amp;ssl=1\" data-orig-size=\"650,398\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Decision Tree The CART\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Decision Tree The CART&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/Decision-Tree-The-CART.jpg?fit=300%2C183&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/Decision-Tree-The-CART.jpg?fit=640%2C392&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-3744\" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/Decision-Tree-The-CART.jpg?resize=571%2C350\" alt=\"Decision Tree The CART\" width=\"571\" height=\"350\" srcset=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/Decision-Tree-The-CART.jpg?w=650&amp;ssl=1 650w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/Decision-Tree-The-CART.jpg?resize=250%2C153&amp;ssl=1 250w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/Decision-Tree-The-CART.jpg?resize=300%2C183&amp;ssl=1 300w\" sizes=\"(max-width: 571px) 100vw, 571px\" data-recalc-dims=\"1\" \/><\/a><p id=\"caption-attachment-3744\" class=\"wp-caption-text\">Decision Tree The CART<\/p><\/div>\n<p>Let us see if we can produce a better tree using entropy or the c4.5 algorithm. Since the c4.5 algorithm is capable of producing multiple node decision trees, hence we will have one additional possibility of a tree (with 3 nodes &#8211; low; medium; high). This is in addition to the binary trees explored in the previous article.<\/p>\n<p>The way the c4.5 works is it compares the entropy of all the possible trees with the original data (baseline data). Then it chooses the tree with maximum information gain i.e. difference of entropies:<\/p>\n<pre><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=%5Ctextup%7BInformation+Gain%7D%3DEntropy_%7B%5Cmathbf%7B%7Bbaseline%7D%7D%7D+-Entropy_%7B%5Cmathbf%7B%7Btree%7D%7D%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"&#92;textup{Information Gain}=Entropy_{&#92;mathbf{{baseline}}} -Entropy_{&#92;mathbf{{tree}}} \" class=\"latex\" \/><\/pre>\n<p>Hence we need to first calculate the baseline entropy of data with 4.2% conversion (4200 conversions out of 100,000 solicited customers). Notice in the second term 95.8% (=100%-4.2%) is the percentage of non-converted customers.<\/p>\n<pre><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=Entropy_%7B%5Cmathbf%7B%7Bbaseline%7D%7D%7D%3D-%284.2%5C%25%5Ctimes+log_%7B2%7D%284.2%5C%25%29%2B%2895.8%5C%25%29%5Ctimes+log_%7B2%7D%2895.8%5C%25%29%29%3D25.139%5C%25+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"Entropy_{&#92;mathbf{{baseline}}}=-(4.2&#92;%&#92;times log_{2}(4.2&#92;%)+(95.8&#92;%)&#92;times log_{2}(95.8&#92;%))=25.139&#92;% \" class=\"latex\" \/><\/pre>\n<p>This is the same value we have calculated at the bottom-most row of the following table for total entropy.<\/p>\n<table style=\"height: 372px; width: 464px;\" border=\"2\" width=\"464\">\n<tbody>\n<tr style=\"background-color: #1a8fe4; border: 2px solid #000000;\">\n<td width=\"92\"><span style=\"color: #ffffff;\"><strong>Child Nodes<\/strong><\/span><\/td>\n<td width=\"71\"><span style=\"color: #ffffff;\"><strong>Number of customers<\/strong><\/span><\/td>\n<td width=\"74\"><span style=\"color: #ffffff;\"><strong>Number of customers responded<\/strong><\/span><\/td>\n<td width=\"75\"><span style=\"color: #ffffff;\"><strong>% responded<\/strong><\/span><\/td>\n<td width=\"64\"><span style=\"color: #ffffff;\"><strong>Individual Node entropy<\/strong><\/span><\/td>\n<td width=\"64\"><span style=\"color: #ffffff;\"><strong>Total Entropy\u00a0<\/strong><\/span><\/td>\n<td width=\"64\"><span style=\"color: #ffffff;\"><strong>Information Gain<\/strong><\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #fdc9a4; border: 2px solid #000000;\">\n<td style=\"width: 2px;\">low<\/td>\n<td style=\"width: 2px;\">40000<\/td>\n<td style=\"width: 2px;\">720<\/td>\n<td style=\"width: 2px;\">1.8%<\/td>\n<td style=\"width: 2px;\">0.130059<\/td>\n<td style=\"width: 2px;\" rowspan=\"3\" width=\"64\"><span style=\"font-size: 14pt;\">24.255%<\/span><\/td>\n<td style=\"width: 2px;\" rowspan=\"3\" width=\"64\"><span style=\"font-size: 14pt;\">0.88%<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #fdc9a4; border: 2px solid #000000;\">\n<td style=\"width: 2px;\">medium<\/td>\n<td style=\"width: 2px;\">30000<\/td>\n<td style=\"width: 2px;\">1380<\/td>\n<td style=\"width: 2px;\">4.6%<\/td>\n<td style=\"width: 2px;\">0.269156<\/td>\n<\/tr>\n<tr style=\"background-color: #fdc9a4; border: 2px solid #000000;\">\n<td style=\"width: 2px;\">high<\/td>\n<td style=\"width: 2px;\">30000<\/td>\n<td style=\"width: 2px;\">2100<\/td>\n<td style=\"width: 2px;\">7.0%<\/td>\n<td style=\"width: 2px;\">0.365924<\/td>\n<\/tr>\n<tr style=\"border: 2px solid #000000;\">\n<td>low<\/td>\n<td>40000<\/td>\n<td>720<\/td>\n<td>1.8%<\/td>\n<td>0.130059<\/td>\n<td rowspan=\"2\" width=\"64\"><span style=\"font-size: 14pt;\">24.370%<\/span><\/td>\n<td rowspan=\"2\" width=\"64\"><span style=\"font-size: 14pt;\">0.77%<\/span><\/td>\n<\/tr>\n<tr style=\"border: 2px solid #000000;\">\n<td>medium + high<\/td>\n<td>60000<\/td>\n<td>3480<\/td>\n<td>5.8%<\/td>\n<td>0.319454<\/td>\n<\/tr>\n<tr style=\"background-color: #fdc9a4; border: 2px solid #000000;\">\n<td>low+ medium<\/td>\n<td>70000<\/td>\n<td>2100<\/td>\n<td>3.0%<\/td>\n<td>0.194392<\/td>\n<td rowspan=\"2\"><span style=\"font-size: 14pt;\">24.585%<\/span><\/td>\n<td rowspan=\"2\" width=\"64\"><span style=\"font-size: 14pt;\">0.55%<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #fdc9a4; border: 2px solid #000000;\">\n<td>high<\/td>\n<td>30000<\/td>\n<td>2100<\/td>\n<td>7.0%<\/td>\n<td>0.365924<\/td>\n<\/tr>\n<tr style=\"border: 2px solid #000000;\">\n<td>low + high<\/td>\n<td>70000<\/td>\n<td>2820<\/td>\n<td>4.0%<\/td>\n<td>0.242292<\/td>\n<td rowspan=\"2\" width=\"64\"><span style=\"font-size: 14pt;\">25.127%<\/span><\/td>\n<td rowspan=\"2\" width=\"64\"><span style=\"font-size: 14pt;\">0.01%<\/span><\/td>\n<\/tr>\n<tr style=\"border: 2px solid #000000;\">\n<td>medium<\/td>\n<td>30000<\/td>\n<td>1380<\/td>\n<td>4.6%<\/td>\n<td>0.269156<\/td>\n<\/tr>\n<tr style=\"background-color: #1a8fe4; border: 1px solid #000000;\">\n<td><span style=\"color: #ffffff;\"><strong>\u00a0Total<\/strong><\/span><\/td>\n<td><span style=\"color: #ffffff;\"><strong>100000<\/strong><\/span><\/td>\n<td><span style=\"color: #ffffff;\"><strong>4200<\/strong><\/span><\/td>\n<td><span style=\"color: #ffffff;\"><strong>4.2%<\/strong><\/span><\/td>\n<td><span style=\"color: #ffffff;\"><strong>0.25139<\/strong><\/span><\/td>\n<td><span style=\"color: #ffffff;\"><strong>25.139%<\/strong><\/span><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Now let us try to find the entropy of the tree by calculating entropies of individual components of the first tree\u00a0(with 3 nodes &#8211; low; medium; high)<\/p>\n<pre><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=Entropy_%7B%5Cmathbf%7B%7Blow%7D%7D%7D%3D-%281.8%5C%25%5Ctimes+log_%7B2%7D%281.8%5C%25%29%2B%2898.2%5C%25%29%5Ctimes+log_%7B2%7D%2898.2%5C%25%29%29%3D13.0059%5C%25+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"Entropy_{&#92;mathbf{{low}}}=-(1.8&#92;%&#92;times log_{2}(1.8&#92;%)+(98.2&#92;%)&#92;times log_{2}(98.2&#92;%))=13.0059&#92;% \" class=\"latex\" \/>\r\n\r\n<img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=Entropy_%7B%5Cmathbf%7B%7Bmedium%7D%7D%7D%3D-%284.6%5C%25%5Ctimes+log_%7B2%7D%284.6%5C%25%29%2B%2895.4%5C%25%29%5Ctimes+log_%7B2%7D%2895.4%5C%25%29%29%3D26.9156%5C%25+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"Entropy_{&#92;mathbf{{medium}}}=-(4.6&#92;%&#92;times log_{2}(4.6&#92;%)+(95.4&#92;%)&#92;times log_{2}(95.4&#92;%))=26.9156&#92;% \" class=\"latex\" \/>\r\n\r\n<img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=Entropy_%7B%5Cmathbf%7B%7Bhigh%7D%7D%7D%3D-%287.0%5C%25%5Ctimes+log_%7B2%7D%287.0%5C%25%29%2B%2893.0%5C%25%29%5Ctimes+log_%7B2%7D%2893.0%5C%25%29%29%3D36.5924%5C%25+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"Entropy_{&#92;mathbf{{high}}}=-(7.0&#92;%&#92;times log_{2}(7.0&#92;%)+(93.0&#92;%)&#92;times log_{2}(93.0&#92;%))=36.5924&#92;% \" class=\"latex\" \/><\/pre>\n<p>Now, the total entropy of this tree is just the weighted sum of all its components. Here, the weights are the number of customers in a node divided by the\u00a0total number of customers e.g. 40,000\/100,000 = 0.4 for the first node.<\/p>\n<pre><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=Entropy_%7B%5Cboldsymbol%7B%7Btree%7D%7D%7D%3D%280.4%5Ctimes13.0059%2B0.3%5Ctimes26.9156%2B0.3%5Ctimes36.5924%29%5C%25%3D24.255%5C%25+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"Entropy_{&#92;boldsymbol{{tree}}}=(0.4&#92;times13.0059+0.3&#92;times26.9156+0.3&#92;times36.5924)&#92;%=24.255&#92;% \" class=\"latex\" \/><\/pre>\n<p>Finally, we need to find the value of information gain i.e.<\/p>\n<pre><img decoding=\"async\" src=\"https:\/\/s0.wp.com\/latex.php?latex=%5Ctextup%7BInformation+Gain%7D%3D25.139%5C%25-24.255%5C%25%3D0.88%5C%25+&#038;bg=ffffff&#038;fg=000&#038;s=0&#038;c=20201002\" alt=\"&#92;textup{Information Gain}=25.139&#92;%-24.255&#92;%=0.88&#92;% \" class=\"latex\" \/><\/pre>\n<p>Incidentally, information gain for the tree with three nodes is the highest as compared to other trees (see the table above). Hence, the c4.5 algorithm using entropy will create the following decision tree:<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_3954\" style=\"width: 863px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/DTree-C4.5-final.jpg\"><img aria-describedby=\"caption-attachment-3954\" data-attachment-id=\"3954\" data-permalink=\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/dtree-c4-5-final\/\" data-orig-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/DTree-C4.5-final.jpg?fit=933%2C396&amp;ssl=1\" data-orig-size=\"933,396\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"C4.5  Decision Tree using Entropy\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;C4.5  Decision Tree using Entropy&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/DTree-C4.5-final.jpg?fit=300%2C127&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/DTree-C4.5-final.jpg?fit=640%2C272&amp;ssl=1\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-3954 \" src=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/DTree-C4.5-final.jpg?resize=640%2C271\" alt=\"C4.5 Decision Tree using Entropy\" width=\"640\" height=\"271\" srcset=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/DTree-C4.5-final.jpg?w=933&amp;ssl=1 933w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/DTree-C4.5-final.jpg?resize=250%2C106&amp;ssl=1 250w, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/DTree-C4.5-final.jpg?resize=300%2C127&amp;ssl=1 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/a><p id=\"caption-attachment-3954\" class=\"wp-caption-text\">C4.5 Decision Tree using Entropy<\/p><\/div>\n<h4><span style=\"color: #3366ff;\">Sign-off Note<\/span><\/h4>\n<p>How cool is entropy! Yes, I admit I love physics. However, this connection of thermodynamics with information still gives me goose bumps. The idea is that information removes uncertainty or randomness in the system. Hence, using information one can take the path from disorder to order! Yes, the Universe is destined to move toward disorder or randomness, but in small pockets, we can still use information to produce order.<\/p>\n<table border=\"1\">\n<tbody>\n<tr style=\"background-color: #ccffff; border: 1px solid #000000;\">\n<td>If you are keen on learning\u00a0deeper links between thermodynamics &amp; information theory then watch the following two-part documentary by the BBC:<br \/>\n&#8211; Order and disorder (<a href=\"https:\/\/www.youtube.com\/watch?v=OJ3CJvzwXTQ\">Link<\/a>)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>See you soon with the next article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is a continuation of the retail case study example we have been working on for the last few weeks. You can find the previous parts of the case study example at the following links: Part 1:\u00a0Introduction Part 2:\u00a0Problem Definition Part 3:\u00a0EDA Part 4:\u00a0Association Analysis Part 5: Decision Tree (CART) If you recall from<\/p>\n<p><a class=\"excerpt-more blog-excerpt\" href=\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":3832,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1,59],"tags":[7,42,6,72,10],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Decision Tree - Entropy - Retail Case Study Example<\/title>\n<meta name=\"description\" content=\"Case study example for an online retail store: explore the power of entropy based Decision Tree in marketing analytics for customer segmentation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Decision Tree - Entropy - Retail Case Study Example\" \/>\n<meta property=\"og:description\" content=\"Case study example for an online retail store: explore the power of entropy based Decision Tree in marketing analytics for customer segmentation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/\" \/>\n<meta property=\"og:site_name\" content=\"YOU CANalytics |\" \/>\n<meta property=\"article:author\" content=\"roopam\" \/>\n<meta property=\"article:published_time\" content=\"2014-08-14T01:17:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-10-12T17:36:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&#038;ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"994\" \/>\n\t<meta property=\"og:image:height\" content=\"1400\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roopam Upadhyay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#organization\",\"name\":\"YOU CANalytics\",\"url\":\"https:\/\/ucanalytics.com\/blogs\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2015\/11\/YOU-CANalytics-Logo.jpg?fit=607%2C120\",\"contentUrl\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2015\/11\/YOU-CANalytics-Logo.jpg?fit=607%2C120\",\"width\":607,\"height\":120,\"caption\":\"YOU CANalytics\"},\"image\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#website\",\"url\":\"https:\/\/ucanalytics.com\/blogs\/\",\"name\":\"YOU CANalytics |\",\"description\":\"Explore the Power of Data Science\",\"publisher\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ucanalytics.com\/blogs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&ssl=1\",\"width\":994,\"height\":1400,\"caption\":\"Entropy - by Roopam\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#webpage\",\"url\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/\",\"name\":\"Decision Tree - Entropy - Retail Case Study Example\",\"isPartOf\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#primaryimage\"},\"datePublished\":\"2014-08-14T01:17:20+00:00\",\"dateModified\":\"2016-10-12T17:36:40+00:00\",\"description\":\"Case study example for an online retail store: explore the power of entropy based Decision Tree in marketing analytics for customer segmentation.\",\"breadcrumb\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ucanalytics.com\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Decision Tree &#8211; Entropy &#8211; Retail Case Study Example (Part 6)\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#webpage\"},\"author\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#\/schema\/person\/55961a1cea272ecdf290cb387be069b6\"},\"headline\":\"Decision Tree &#8211; Entropy &#8211; Retail Case Study Example (Part 6)\",\"datePublished\":\"2014-08-14T01:17:20+00:00\",\"dateModified\":\"2016-10-12T17:36:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#webpage\"},\"wordCount\":1108,\"commentCount\":14,\"publisher\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#organization\"},\"image\":{\"@id\":\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&ssl=1\",\"keywords\":[\"Business Analytics\",\"Marketing Analytics\",\"Predictive Analytics\",\"Retail Analytics\",\"Roopam Upadhyay\"],\"articleSection\":[\"Marketing Analytics\",\"Retail Case Study Example\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#\/schema\/person\/55961a1cea272ecdf290cb387be069b6\",\"name\":\"Roopam Upadhyay\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ucanalytics.com\/blogs\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dd1aa0b0e813f7639800bcfad6a554f1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dd1aa0b0e813f7639800bcfad6a554f1?s=96&d=mm&r=g\",\"caption\":\"Roopam Upadhyay\"},\"description\":\"This blog contains my personal views and thoughts on predictive Analytics and big data. - Roopam Upadhyay\",\"sameAs\":[\"roopam\"],\"url\":\"https:\/\/ucanalytics.com\/blogs\/author\/roopam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Decision Tree - Entropy - Retail Case Study Example","description":"Case study example for an online retail store: explore the power of entropy based Decision Tree in marketing analytics for customer segmentation.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/","og_locale":"en_US","og_type":"article","og_title":"Decision Tree - Entropy - Retail Case Study Example","og_description":"Case study example for an online retail store: explore the power of entropy based Decision Tree in marketing analytics for customer segmentation.","og_url":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/","og_site_name":"YOU CANalytics |","article_author":"roopam","article_published_time":"2014-08-14T01:17:20+00:00","article_modified_time":"2016-10-12T17:36:40+00:00","og_image":[{"width":994,"height":1400,"url":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&ssl=1","type":"image\/jpeg"}],"twitter_misc":{"Written by":"Roopam Upadhyay","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/ucanalytics.com\/blogs\/#organization","name":"YOU CANalytics","url":"https:\/\/ucanalytics.com\/blogs\/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https:\/\/ucanalytics.com\/blogs\/#logo","inLanguage":"en-US","url":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2015\/11\/YOU-CANalytics-Logo.jpg?fit=607%2C120","contentUrl":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2015\/11\/YOU-CANalytics-Logo.jpg?fit=607%2C120","width":607,"height":120,"caption":"YOU CANalytics"},"image":{"@id":"https:\/\/ucanalytics.com\/blogs\/#logo"}},{"@type":"WebSite","@id":"https:\/\/ucanalytics.com\/blogs\/#website","url":"https:\/\/ucanalytics.com\/blogs\/","name":"YOU CANalytics |","description":"Explore the Power of Data Science","publisher":{"@id":"https:\/\/ucanalytics.com\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ucanalytics.com\/blogs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#primaryimage","inLanguage":"en-US","url":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&ssl=1","width":994,"height":1400,"caption":"Entropy - by Roopam"},{"@type":"WebPage","@id":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#webpage","url":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/","name":"Decision Tree - Entropy - Retail Case Study Example","isPartOf":{"@id":"https:\/\/ucanalytics.com\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#primaryimage"},"datePublished":"2014-08-14T01:17:20+00:00","dateModified":"2016-10-12T17:36:40+00:00","description":"Case study example for an online retail store: explore the power of entropy based Decision Tree in marketing analytics for customer segmentation.","breadcrumb":{"@id":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ucanalytics.com\/blogs\/"},{"@type":"ListItem","position":2,"name":"Decision Tree &#8211; Entropy &#8211; Retail Case Study Example (Part 6)"}]},{"@type":"Article","@id":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#article","isPartOf":{"@id":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#webpage"},"author":{"@id":"https:\/\/ucanalytics.com\/blogs\/#\/schema\/person\/55961a1cea272ecdf290cb387be069b6"},"headline":"Decision Tree &#8211; Entropy &#8211; Retail Case Study Example (Part 6)","datePublished":"2014-08-14T01:17:20+00:00","dateModified":"2016-10-12T17:36:40+00:00","mainEntityOfPage":{"@id":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#webpage"},"wordCount":1108,"commentCount":14,"publisher":{"@id":"https:\/\/ucanalytics.com\/blogs\/#organization"},"image":{"@id":"https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&ssl=1","keywords":["Business Analytics","Marketing Analytics","Predictive Analytics","Retail Analytics","Roopam Upadhyay"],"articleSection":["Marketing Analytics","Retail Case Study Example"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ucanalytics.com\/blogs\/decision-tree-entropy-retail-case-part-6\/#respond"]}]},{"@type":"Person","@id":"https:\/\/ucanalytics.com\/blogs\/#\/schema\/person\/55961a1cea272ecdf290cb387be069b6","name":"Roopam Upadhyay","image":{"@type":"ImageObject","@id":"https:\/\/ucanalytics.com\/blogs\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/dd1aa0b0e813f7639800bcfad6a554f1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd1aa0b0e813f7639800bcfad6a554f1?s=96&d=mm&r=g","caption":"Roopam Upadhyay"},"description":"This blog contains my personal views and thoughts on predictive Analytics and big data. - Roopam Upadhyay","sameAs":["roopam"],"url":"https:\/\/ucanalytics.com\/blogs\/author\/roopam\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/08\/photo-2.jpg?fit=994%2C1400&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3L0jT-ZN","jetpack-related-posts":[{"id":3129,"url":"https:\/\/ucanalytics.com\/blogs\/marketing-analytics-retail-case-study-part-1\/","url_meta":{"origin":3831,"position":0},"title":"Marketing Analytics &#8211; Retail Case Study Example (Part 1)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"Today we are going to start a new case study example on YOU CANalytics. In this case study example, we will examine different facets of marketing analytics and customer relationship management (CRM). We will use the example of online retail to explore more about marketing analytics - an area of\u2026","rel":"","context":"In &quot;Marketing Analytics&quot;","block_context":{"text":"Marketing Analytics","link":"https:\/\/ucanalytics.com\/blogs\/category\/marketing-analytics\/"},"img":{"alt_text":"Marketing Analytics Modeling","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/06\/Marketing-Analytics-Modeling-Blog.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/06\/Marketing-Analytics-Modeling-Blog.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/06\/Marketing-Analytics-Modeling-Blog.jpg?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/06\/Marketing-Analytics-Modeling-Blog.jpg?resize=700%2C400 2x"},"classes":[]},{"id":3973,"url":"https:\/\/ucanalytics.com\/blogs\/model-selection-retail-case-study-example-part-7\/","url_meta":{"origin":3831,"position":1},"title":"Model Selection &#8211; Retail Case Study Example (Part 7)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"Model Selection This is a continuation of our retail case study example for campaign and marketing analytics. In the previous two parts, we discussed a couple of decision tree algorithms (CART and C4.5)\u00a0for classification. Recall a previous case study example on\u00a0banking and risk management where we discussed logistic regression\u00a0which is\u2026","rel":"","context":"In &quot;Marketing Analytics&quot;","block_context":{"text":"Marketing Analytics","link":"https:\/\/ucanalytics.com\/blogs\/category\/marketing-analytics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/09\/photo.jpg?fit=1200%2C1029&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3195,"url":"https:\/\/ucanalytics.com\/blogs\/marketing-analytics-retail-case-study-example-part-2\/","url_meta":{"origin":3831,"position":2},"title":"Marketing Analytics &#8211; Retail Case Study Example (Part 2)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"Last week we started a case study from the online retail industry to learn more about marketing analytics (Read Part 1). Before we continue with the same case, let me share a few factors that enhance the quality of analysis for marketing or customer analytics. The obvious factors, of course,\u2026","rel":"","context":"In &quot;Marketing Analytics&quot;","block_context":{"text":"Marketing Analytics","link":"https:\/\/ucanalytics.com\/blogs\/category\/marketing-analytics\/"},"img":{"alt_text":"Noir - by Roopam","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/02\/photo.jpg?fit=713%2C1024&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/02\/photo.jpg?fit=713%2C1024&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/02\/photo.jpg?fit=713%2C1024&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/02\/photo.jpg?fit=713%2C1024&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3318,"url":"https:\/\/ucanalytics.com\/blogs\/exploratory-data-analysis-retail-case-study-example-part-3\/","url_meta":{"origin":3831,"position":3},"title":"Exploratory Data Analysis (EDA) &#8211; Retail Case Study Example (Part 3)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"For the last couple of weeks we have been\u00a0working on a marketing analytics case study example (read Part 1 and Part 2). In the last part (Part 2) we defined a couple of advanced analytics objectives based on the business problem at an online retail\u00a0company called DresSmart Inc. In this\u2026","rel":"","context":"In &quot;Marketing Analytics&quot;","block_context":{"text":"Marketing Analytics","link":"https:\/\/ucanalytics.com\/blogs\/category\/marketing-analytics\/"},"img":{"alt_text":"penalty shootout","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/penalty-shootout.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/penalty-shootout.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/07\/penalty-shootout.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":4357,"url":"https:\/\/ucanalytics.com\/blogs\/next-best-action-retail-case-study-example-part-11\/","url_meta":{"origin":3831,"position":4},"title":"Next Best Action &#8211; Retail Case Study Example (Epilogue)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"This article is the epilogue to our case study example about campaign and marketing analytics for an online retail company. You could read the previous parts at Problem definition: \u00a0Part 1\u00a0&\u00a0Part 2 Description: Part 3 Association: Part 4 Classification: Part 5, Part 6,\u00a0Part 7,\u00a0Part 8 Estimation: Part 9, Part 10\u2026","rel":"","context":"In &quot;Marketing Analytics&quot;","block_context":{"text":"Marketing Analytics","link":"https:\/\/ucanalytics.com\/blogs\/category\/marketing-analytics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/11\/Free-Will.jpg?fit=315%2C448&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4274,"url":"https:\/\/ucanalytics.com\/blogs\/regression-model-retail-case-study-part-10\/","url_meta":{"origin":3831,"position":5},"title":"Regression Model &#8211; Retail Case Study Example (Part 10)","author":"Roopam Upadhyay","date":false,"format":false,"excerpt":"This article is a continuation of our marketing analytics case study example for campaign management solutions. In this case, we started with the following\u00a0two\u00a0goals to build models to identify Most responsive customers Most revenue generating customers Problem definition: \u00a0Part 1\u00a0&\u00a0Part 2 Description: Part 3 Association: Part 4 Classification: Part 5,\u2026","rel":"","context":"In &quot;Marketing Analytics&quot;","block_context":{"text":"Marketing Analytics","link":"https:\/\/ucanalytics.com\/blogs\/category\/marketing-analytics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/ucanalytics.com\/blogs\/wp-content\/uploads\/2014\/10\/Regression-Train-by-Roopam.jpg?fit=448%2C320&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/posts\/3831"}],"collection":[{"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/comments?post=3831"}],"version-history":[{"count":0,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/posts\/3831\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/media\/3832"}],"wp:attachment":[{"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/media?parent=3831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/categories?post=3831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ucanalytics.com\/blogs\/wp-json\/wp\/v2\/tags?post=3831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}